summaryrefslogtreecommitdiffstats
path: root/abs/core/ipw3945d
diff options
context:
space:
mode:
authorJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
committerJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
commit0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch)
treec0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core/ipw3945d
downloadlinhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2
initial import
Diffstat (limited to 'abs/core/ipw3945d')
-rw-r--r--abs/core/ipw3945d/PKGBUILD28
-rw-r--r--abs/core/ipw3945d/ipw3945d.install35
-rw-r--r--abs/core/ipw3945d/ipw3945d.rc42
3 files changed, 105 insertions, 0 deletions
diff --git a/abs/core/ipw3945d/PKGBUILD b/abs/core/ipw3945d/PKGBUILD
new file mode 100644
index 0000000..07e9043
--- /dev/null
+++ b/abs/core/ipw3945d/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: James Rayner <iphitus@gmail.com>
+# Contributor: Giovanni Scafora <linuxmania@gmail.com>
+
+pkgname=ipw3945d
+pkgver=1.7.22
+pkgrel=4
+pkgdesc="Regulatory daemon for IPW3945"
+arch=(i686 x86_64)
+url="http://www.bughost.org/ipw3945"
+license=""
+depends=('glibc')
+install=ipw3945d.install
+source=(http://www.bughost.org/ipw3945/daemon/$pkgname-$pkgver.tgz ipw3945d.rc)
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ #Install daemon w/ Arch specific fix
+ if [ "$CARCH" = "x86_64" ]; then
+ install -D -m 755 x86_64/ipw3945d $startdir/pkg/sbin/ipw3945d
+ else install -D -m 755 x86/ipw3945d $startdir/pkg/sbin/ipw3945d
+ fi
+ # Install license
+ install -D -m 644 LICENSE.ipw3945d $startdir/pkg/usr/share/licenses/$pkgname/LICENSE
+ install -m755 -D $startdir/src/ipw3945d.rc $startdir/pkg/etc/rc.d/ipw3945d || return
+}
+
+md5sums=('097888f5be05eb2b9b87dcdbeeb948ce' '72aafd7cba214592de6175974a48b4f9')
diff --git a/abs/core/ipw3945d/ipw3945d.install b/abs/core/ipw3945d/ipw3945d.install
new file mode 100644
index 0000000..3d35fc5
--- /dev/null
+++ b/abs/core/ipw3945d/ipw3945d.install
@@ -0,0 +1,35 @@
+# arg 1: the new package version
+post_install() {
+cat << EOF
+IMPORTANT
+==> In order to use this daemon you have to agree to Intel's license located
+==> in /usr/share/licenses/custom/ipw3945d/LICENSE.ipw3945d
+==> else please remove this package.
+==>
+==> To use this daemon, add 'ipw3945d' to your DAEMONS=() entry in /etc/rc.conf
+EOF
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+cat << EOF
+IMPORTANT
+==> In order to use this daemon you have to agree to Intel's license located
+==> in /usr/share/licenses/custom/ipw3945d/LICENSE.ipw3945d
+==> else please remove this package.
+==>
+AUTOMATIC DAEMON LOADING VIA MODPROBE
+==> To do this, you typically place the following two lines into your
+==> /etc/modprobe.conf:
+==> echo install ipw3945 /sbin/modprobe --ignore-install ipw3945 ; \
+==> sleep 0.5 ; /sbin/ipw3945d --quiet >> /etc/modprobe.conf
+==>
+==> echo remove ipw3945 /sbin/ipw3945d --kill ; \
+==> /sbin/modprobe -r --ignore-remove ipw3945 >> /etc/modprobe.conf
+EOF
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/core/ipw3945d/ipw3945d.rc b/abs/core/ipw3945d/ipw3945d.rc
new file mode 100644
index 0000000..b0e02bb
--- /dev/null
+++ b/abs/core/ipw3945d/ipw3945d.rc
@@ -0,0 +1,42 @@
+
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /sbin/ipw3945d`
+case "$1" in
+ start)
+ stat_busy "Starting IPW3945d"
+ [ -z "$PID" ] && /sbin/ipw3945d --quiet
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ echo `pidof -o %PPID /sbin/ipw3945d` > /var/run/ipw3945d.pid
+ add_daemon ipw3945d
+ sleep 1 # not good, but daemon needs time to upload to card, otherwise network fails.
+ stat_done
+ fi
+
+ sleep 0.5
+ ;;
+ stop)
+ stat_busy "Stopping IPW3945d"
+ [ ! -z "$PID" ] && /sbin/ipw3945d --kill
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon ipw3945d
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
+