wok-next view linux-module-headers/receipt @ rev 14487
gst-plugins-good: update deps
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Fri May 03 07:24:51 2013 +0200 (2013-05-03) |
parents | 8387b6915400 |
children | ad59999b3fce |
line source
1 # SliTaz package receipt.
3 PACKAGE="linux-module-headers"
4 VERSION="3.2.40"
5 BASEVER="${VERSION:0:3}"
6 CATEGORY="development"
7 SHORT_DESC="Header files and scripts for building modules for linux kernel."
8 MAINTAINER="devel@slitaz.org"
9 DEPENDS="slitaz-toolchain"
10 WANTED="linux"
11 WEB_SITE="http://kernel.org/"
12 KVERSION=$BASEVER-slitaz
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
17 local path
18 _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
19 AUFSDIR="$WOK/$WANTED/aufs-${_AUFSVER}"
20 path=usr/src/linux-$KVERSION
21 mkdir -p $fs/lib/modules/$KVERSION
22 ln -sf /$path $fs/lib/modules/$KVERSION/build
23 install -D -m644 $src/Makefile \
24 $fs/$path/Makefile
25 install -D -m644 $src/kernel/Makefile \
26 $fs/$path/kernel/Makefile
27 install -D -m644 $src/.config \
28 $fs/$path/.config
29 mkdir -p $fs/$path/include
31 for i in acpi asm-generic config crypto drm generated linux math-emu \
32 media net pcmcia scsi sound trace video xen; do
33 cp -a $src/include/$i $fs/$path/include/
34 done
36 # copy arch includes for external modules
37 mkdir -p $fs/$path/arch/x86
38 cp -a $src/arch/x86/include $fs/$path/arch/x86/
40 # copy files necessary for later builds, like nvidia and vmware
41 cp -a $src/Module.symvers-modules $fs/$path/Module.symvers
42 cp -a $src/scripts $fs/$path
43 # fix permissions on scripts dir
44 chmod og-w -R $fs/$path/scripts
45 mkdir -p $fs/$path/.tmp_versions
47 mkdir -p $fs/$path/arch/x86/kernel
48 cp -a $src/arch/x86/Makefile $fs/$path/arch/x86/
49 cp -a $src/arch/x86/Makefile_32.cpu $fs/$path/arch/x86/
50 cp -a $src/arch/x86/kernel/asm-offsets.s $fs/$path/arch/x86/kernel/
52 # add headers for lirc package
53 mkdir -p $fs/$path/drivers/media/video
54 cp -a $src/drivers/media/video/*.h $fs/$path/drivers/media/video/
56 for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 ; do
57 mkdir -p $fs/$path/drivers/media/video/$i
58 cp -a $src/drivers/media/video/$i/*.h $fs/$path/drivers/media/video/$i
59 done
61 # add docbook makefile
62 install -D -m644 $src/Documentation/DocBook/Makefile \
63 $fs/$path/Documentation/DocBook/Makefile
65 # add dm headers
66 mkdir -p $fs/$path/drivers/md
67 cp -a $src/drivers/md/*.h $fs/$path/drivers/md
69 # add inotify.h
70 mkdir -p $fs/$path/include/linux
71 cp -a $src/include/linux/inotify.h $fs/$path/include/linux/
73 # add wireless headers
74 mkdir -p $fs/$path/net/mac80211/
75 cp -a $src/net/mac80211/*.h $fs/$path/net/mac80211/
77 # add dvb headers for external modules
78 # in reference to:
79 # http://bugs.archlinux.org/task/9912
80 mkdir -p $fs/$path/drivers/media/dvb/dvb-core
81 cp -a $src/drivers/media/dvb/dvb-core/*.h $fs/$path/drivers/media/dvb/dvb-core/
83 # add dvb headers for external modules
84 # in reference to:
85 # http://bugs.archlinux.org/task/11194
86 if [ -d $src/include/config/dvb/ ]; then
87 mkdir -p $fs/$path/include/config/dvb/
88 cp $src/include/config/dvb/*.h $fs/$path/include/config/dvb/
89 fi
91 # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
92 # in reference to:
93 # http://bugs.archlinux.org/task/13146
94 mkdir -p $fs/$path/drivers/media/dvb/frontends/
95 cp -a $src/drivers/media/dvb/frontends/lgdt330x.h $fs/$path/drivers/media/dvb/frontends/
96 cp -a $src/drivers/media/video/msp3400-driver.h $fs/$path/drivers/media/dvb/frontends/
98 # add dvb headers
99 # in reference to:
100 # http://bugs.archlinux.org/task/20402
101 mkdir -p $fs/$path/drivers/media/dvb/dvb-usb
102 cp -a $src/drivers/media/dvb/dvb-usb/*.h $fs/$path/drivers/media/dvb/dvb-usb/
103 mkdir -p $fs/$path/drivers/media/dvb/frontends
104 cp -a $src/drivers/media/dvb/frontends/*.h $fs/$path/drivers/media/dvb/frontends/
105 mkdir -p $fs/$path/drivers/media/common/tuners
106 cp -a $src/drivers/media/common/tuners/*.h $fs/$path/drivers/media/common/tuners/
108 # add xfs and shmem for aufs building
109 mkdir -p $fs/$path/fs/xfs
110 mkdir -p $fs/$path/mm
111 cp -a $src/fs/xfs/xfs_sb.h $fs/$path/fs/xfs/xfs_sb.h
113 # copy in Kconfig files
114 for i in $(find . -name "Kconfig*"); do
115 mkdir -p $fs/$path/$(echo $i | sed 's|/Kconfig.*||')
116 cp -a $src/$i $fs/$path/$i
117 done
119 chown -R root.root $fs/$path
120 find $fs/$path -type d -exec chmod 755 {} \;
121 # remove unneeded architectures
122 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}
124 }
126 pre_remove() {
127 if [ -e $1/usr/src/linux ]; then
128 rm -rf $1/usr/src/linux
129 fi
130 }
132 post_install() {
133 # Added soft link to make it easier to point to kernel folder
134 [ -L $1/usr/src/linux ] && rm -f $1/usr/src/linux
135 ln -sf /usr/src/linux-$KVERSION $1/usr/src/linux
136 }