1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#!/bin/sh
#
# (c) Eduard Bloch <blade@debian.org>, 2003
# generic maintainer script for module-assistant controled packages
# to be sourced or copied as example code
# autodetecting values. They may be overriden by the caller.
MA_DIR=${MA_DIR:-/usr/share/modass}
MODULE_LOC=${MODULE_LOC:-/usr/src/modules}
SOURCEPKG=linux-wlan-ng
BUILDDIR=$MODULE_LOC/linux-wlan-ng
PKGPREFIX=linux-wlan-ng-modules
. $MA_DIR/packages/generic.sh
installed() {
# action test "`cat $MA_VARDIR/$pkgprefix.cur_version` 2>/dev/null"
# exit $?
test -d $BUILDDIR
exit $?
}
unpack() {
test -d $MODULE_LOC/$SOURCEPKG || download
}
download() {
cd $topdir
tmpdir=`mktemp -d`
cd $tmpdir
cp -a /usr/src/${SOURCEPKG}_* . || true
apt-get source $SOURCEPKG && rm -rf ${MODULE_LOC:-/usr/src/modules}/$SOURCEPKG && mv $SOURCEPKG-* ${MODULE_LOC:-/usr/src/modules}/$SOURCEPKG
mv * $topdir/
rm -rf $tmpdir
}
purge() {
action rm -rf $builddir $MA_VARDIR/$sourcepkg.*
}
purge_all() {
action rm -f `cat $MA_VARDIR/$sourcepkg.buildstate.*`
rm ${MODULE_LOC:-/usr/src/modules}/$SOURCEPKG
purge
}
$1 "$@"
|