wok-next view mISDN/receipt @ rev 2926

linux modules depends on depmod
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu May 07 09:37:08 2009 +0200 (2009-05-07)
parents c1610baa4cf4
children
line source
1 # SliTaz package receipt.
3 PACKAGE="mISDN"
4 VERSION="1_1_7_2"
5 CATEGORY="system-tools"
6 SHORT_DESC="beronet isdn drivers."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.misdn.org/"
10 WGET_URL="${WEB_SITE}downloads/releases/$TARBALL"
11 DEPENDS="linux"
12 BUILD_DEPENDS="linux"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 if [ ! -d $WOK/linux/taz ]; then
18 tazwok cook linux
19 fi
20 KVERS=$(grep "kernel version" $WOK/linux/$(ls $WOK/linux/taz)/.config)
21 KVERS=${KVERS##* }
22 KSRC=$(cd $WOK/linux/$(ls $WOK/linux/taz) ; pwd)
23 cd $src
24 while read file; do
25 [ -f done.$file ] && continue
26 patch -p1 < ../stuff/$file || return 1
27 touch done.$file
28 done <<EOT
29 Makefile.u
30 ${KVERS%.*}.u
31 EOT
32 cp -a include/linux drivers/isdn/hardware/mISDN/
33 ln -s . drivers/isdn/hardware/mISDN/linux/linux
34 for i in $(cd include; ls linux/*); do
35 sed -i "s,.$i.,\"$i\"," drivers/isdn/hardware/mISDN/*.? \
36 drivers/isdn/hardware/mISDN/linux/*.?
37 done
38 sed -i "s,MISDNVERSION,\"$(cat VERSION)\"," drivers/isdn/hardware/mISDN/*.c
39 sed -i 's/depmod/echo/' Makefile
40 make KVERS=$KVERS LINUX=$KSRC KBUILD_NOPEDANTIC=1 DESTDIR=$PWD/_pkg install
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 KVERS=$(grep "kernel version" ../linux/$(ls ../linux/taz)/.config)
47 EXTRAVERSION=_${KVERS##* }
48 mkdir -p $fs/usr $fs/etc
49 ( cd $_pkg ; tar cf - lib/modules/*/extra ) | ( cd $fs ; tar xf - )
50 cp -a $_pkg/usr/* $fs/usr
51 cp -a $_pkg/etc/* $fs/etc
52 }
54 # Post install/remove commands for Tazpkg.
55 post_install()
56 {
57 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
58 }
60 post_remove()
61 {
62 depmod -a
63 }