summaryrefslogtreecommitdiffstats
path: root/abs/extra/irqbalance
diff options
context:
space:
mode:
authorCecil <knoppmyth@gmail.com>2011-07-09 10:03:58 (GMT)
committerCecil <knoppmyth@gmail.com>2011-07-09 10:03:58 (GMT)
commit75e0eda16433ee55f1791bc5f798b917adfcf8ff (patch)
treeecd25525bacd560a85a7c9b0a525e575c65ee51b /abs/extra/irqbalance
parent15ab16433eb5abfe24d588f02b07c4f9158265ec (diff)
downloadlinhes_pkgbuild-75e0eda16433ee55f1791bc5f798b917adfcf8ff.zip
linhes_pkgbuild-75e0eda16433ee55f1791bc5f798b917adfcf8ff.tar.gz
linhes_pkgbuild-75e0eda16433ee55f1791bc5f798b917adfcf8ff.tar.bz2
irqbalance:Bumped to latest.
Diffstat (limited to 'abs/extra/irqbalance')
-rw-r--r--abs/extra/irqbalance/PKGBUILD39
-rw-r--r--abs/extra/irqbalance/irqbalance.rc.d46
2 files changed, 63 insertions, 22 deletions
diff --git a/abs/extra/irqbalance/PKGBUILD b/abs/extra/irqbalance/PKGBUILD
index a21cda2..13db8d0 100644
--- a/abs/extra/irqbalance/PKGBUILD
+++ b/abs/extra/irqbalance/PKGBUILD
@@ -2,8 +2,8 @@
# Contributor: Martin Striz <ms@poruba.net>
pkgname=irqbalance
-pkgver=0.55
-pkgrel=4
+pkgver=0.56
+pkgrel=1
pkgdesc="IRQ balancing daemon for SMP systems"
arch=('i686' 'x86_64')
url="http://www.irqbalance.org/"
@@ -11,29 +11,24 @@ license=('GPL')
depends=(glib2)
makedepends=(pkgconfig)
backup=(etc/conf.d/irqbalance)
-install=($pkgname.install)
-source=(http://www.irqbalance.org/releases/$pkgname-$pkgver.tar.gz
- Makefile.irqbalance
+source=(http://irqbalance.googlecode.com/files/irqbalance-$pkgver.tbz2
irqbalance.conf.d
- run
- finish
- irqbalance.install)
+ irqbalance.rc.d)
+md5sums=('cd0c4d3b2bb84778a04fc594ad83949a'
+ '336c1ee99818f9ecda1687e34c69fd6b'
+ 'fb82fc5d267d39110baf720d81282a7c')
build() {
cd $srcdir/$pkgname-$pkgver
- # use our Makefile instead of one provided which is not quite right
- cp ../Makefile.irqbalance Makefile
- make || return 1
+ ./autogen.sh
+ ./configure
+ make
+}
- install -D -m755 irqbalance $pkgdir/usr/sbin/irqbalance || return 1
- mkdir -p $pkgdir/etc/sv/irqbalance || return 1
- install -D -m644 ../irqbalance.conf.d $pkgdir/etc/conf.d/irqbalance || return 1
- install -D -m755 ../run $pkgdir/etc/sv/irqbalance || return 1
- install -D -m755 ../finish $pkgdir/etc/sv/irqbalance || return 1
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ install -D -m755 irqbalance $pkgdir/usr/sbin/irqbalance
+ install -D -m644 irqbalance.1 $pkgdir/usr/share/man/man1/irqbalance.1
+ install -D -m644 ../irqbalance.conf.d $pkgdir/etc/conf.d/irqbalance
+ install -D -m755 ../irqbalance.rc.d $pkgdir/etc/rc.d/irqbalance
}
-md5sums=('9f6b314ff1fdc14173abeb40592d4edf'
- '45bc9e1d041d8547f2dbf12f887216df'
- '336c1ee99818f9ecda1687e34c69fd6b'
- '7f3ee7fb2fccb619f7c66668b6d96d35'
- 'ebb35e88267f4c2e6f68e675c81b2a34'
- '5f5e96d2fbf35e85d4a8004a3d6b73fc')
diff --git a/abs/extra/irqbalance/irqbalance.rc.d b/abs/extra/irqbalance/irqbalance.rc.d
new file mode 100644
index 0000000..987c26b
--- /dev/null
+++ b/abs/extra/irqbalance/irqbalance.rc.d
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# source application-specific settings
+ONESHOT=0
+[ -f /etc/conf.d/irqbalance ] && . /etc/conf.d/irqbalance
+
+if [ "$ONESHOT" -ne 0 ]; then
+ ONESHOT_CMD="--oneshot"
+fi
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/irqbalance`
+case "$1" in
+ start)
+ stat_busy "Starting IRQ balancing"
+ [ -z "$PID" ] && /usr/sbin/irqbalance $ONESHOT_CMD
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ if [ "$ONESHOT" -eq 0 ]; then
+ add_daemon irqbalance
+ fi
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping IRQ balancing"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon irqbalance
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0