wok-current view linux-module-headers/receipt @ rev 9741

Fix mpfr BUILD_DEPENDS
author Christophe Lincoln <pankso@slitaz.org>
date Tue May 10 02:12:56 2011 +0200 (2011-05-10)
parents c2cbedd53fdc
children 6f536abe4f0b
line source
1 # SliTaz package receipt.
3 PACKAGE="linux-module-headers"
4 VERSION="2.6.37"
5 CATEGORY="development"
6 SHORT_DESC="Header files and scripts for building modules for linux kernel."
7 MAINTAINER="slaxemulator@gmail.com"
8 DEPENDS="slitaz-toolchain"
9 WANTED="linux"
10 WEB_SITE="http://kernel.org/"
11 KVERSION=$VERSION-slitaz
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 genpkg_rules()
15 {
16 local path
17 _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
18 AUFSDIR="$WOK/$WANTED/aufs-${_AUFSVER}"
19 path=usr/src/linux-$KVERSION
20 mkdir -p $fs/lib/modules/$KVERSION
21 ln -sf /$path $fs/lib/modules/$KVERSION/build
22 install -D -m644 $src/Makefile \
23 $fs/$path/Makefile
24 install -D -m644 $src/kernel/Makefile \
25 $fs/$path/kernel/Makefile
26 install -D -m644 $src/.config \
27 $fs/$path/.config
28 mkdir -p $fs/$path/include
30 for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video xen; do
31 cp -a $src/include/$i $fs/$path/include/
32 done
34 # copy arch includes for external modules
35 mkdir -p $fs/$path/arch/x86
36 cp -a $src/arch/x86/include $fs/$path/arch/x86/
38 # copy files necessary for later builds, like nvidia and vmware
39 cp -a $src/Module.symvers-modules $fs/$path/Module.symvers
40 cp -a $src/scripts $fs/$path
41 # fix permissions on scripts dir
42 chmod og-w -R $fs/$path/scripts
43 mkdir -p $fs/$path/.tmp_versions
45 mkdir -p $fs/$path/arch/x86/kernel
46 cp -a $src/arch/x86/Makefile $fs/$path/arch/x86/
47 cp -a $src/arch/x86/Makefile_32.cpu $fs/$path/arch/x86/
48 cp -a $src/arch/x86/kernel/asm-offsets.s $fs/$path/arch/x86/kernel/
50 # add headers for lirc package
51 mkdir -p $fs/$path/drivers/media/video
52 cp -a $src/drivers/media/video/*.h $fs/$path/drivers/media/video/
54 for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo ; do
55 mkdir -p $fs/$path/drivers/media/video/$i
56 cp -a $src/drivers/media/video/$i/*.h $fs/$path/drivers/media/video/$i
57 done
59 # add docbook makefile
60 install -D -m644 $src/Documentation/DocBook/Makefile \
61 $fs/$path/Documentation/DocBook/Makefile
63 # add dm headers
64 mkdir -p $fs/$path/drivers/md
65 cp -a $src/drivers/md/*.h $fs/$path/drivers/md
67 # add inotify.h
68 mkdir -p $fs/$path/include/linux
69 cp -a $src/include/linux/inotify.h $fs/$path/include/linux/
71 # add wireless headers
72 mkdir -p $fs/$path/net/mac80211/
73 cp -a $src/net/mac80211/*.h $fs/$path/net/mac80211/
75 # add dvb headers for external modules
76 # in reference to:
77 # http://bugs.archlinux.org/task/9912
78 mkdir -p $fs/$path/drivers/media/dvb/dvb-core
79 cp -a $src/drivers/media/dvb/dvb-core/*.h $fs/$path/drivers/media/dvb/dvb-core/
81 # add dvb headers for external modules
82 # in reference to:
83 # http://bugs.archlinux.org/task/11194
84 if [ -d $src/include/config/dvb/ ]; then
85 mkdir -p $fs/$path/include/config/dvb/
86 cp $src/include/config/dvb/*.h $fs/$path/include/config/dvb/
87 fi
89 # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
90 # in reference to:
91 # http://bugs.archlinux.org/task/13146
92 mkdir -p $fs/$path/drivers/media/dvb/frontends/
93 cp -a $src/drivers/media/dvb/frontends/lgdt330x.h $fs/$path/drivers/media/dvb/frontends/
94 cp -a $src/drivers/media/video/msp3400-driver.h $fs/$path/drivers/media/dvb/frontends/
96 # add dvb headers
97 # in reference to:
98 # http://bugs.archlinux.org/task/20402
99 mkdir -p $fs/$path/drivers/media/dvb/dvb-usb
100 cp -a $src/drivers/media/dvb/dvb-usb/*.h $fs/$path/drivers/media/dvb/dvb-usb/
101 mkdir -p $fs/$path/drivers/media/dvb/frontends
102 cp -a $src/drivers/media/dvb/frontends/*.h $fs/$path/drivers/media/dvb/frontends/
103 mkdir -p $fs/$path/drivers/media/common/tuners
104 cp -a $src/drivers/media/common/tuners/*.h $fs/$path/drivers/media/common/tuners/
106 # add xfs and shmem for aufs building
107 mkdir -p $fs/$path/fs/xfs
108 mkdir -p $fs/$path/mm
109 cp -a $src/fs/xfs/xfs_sb.h $fs/$path/fs/xfs/xfs_sb.h
111 # add headers vor virtualbox
112 # in reference to:
113 # http://bugs.archlinux.org/task/14568
114 cp -a $src/include/drm $fs/$path/include/
116 # add headers for broadcom wl
117 # in reference to:
118 # http://bugs.archlinux.org/task/14568
119 cp -a $src/include/trace $fs/$path/include/
120 # add headers for crypto modules
121 # in reference to:
122 # http://bugs.archlinux.org/task/22081
123 cp -a $src/include/crypto $fs/$path/include/
124 # copy in Kconfig files
125 for i in $(find . -name "Kconfig*"); do
126 mkdir -p $fs/$path/$(echo $i | sed 's|/Kconfig.*||')
127 cp -a $src/$i $fs/$path/$i
128 done
130 chown -R root.root $fs/$path
131 find $fs/$path -type d -exec chmod 755 {} \;
132 # remove unneeded architectures
133 rm -rf $fs/$path/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
135 }
137 pre_remove() {
138 if [ -e $1/usr/src/linux ]; then
139 rm -rf $1/usr/src/linux
140 fi
141 }
143 post_install() {
144 # Added soft link to make it easier to point to kernel folder
145 [ -L $1/usr/src/linux ] && rm -f $1/usr/src/linux
146 ln -sf /usr/src/linux-$KVERSION $1/usr/src/linux
147 }