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

Up: edje-dev (1.7.9)
author Dominique Corbex <domcox@slitaz.org>
date Tue Nov 05 20:58:04 2013 +0100 (2013-11-05)
parents 416fab3c90c0
children eb689de65d7e
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 LICENSE="GPL2"
10 DEPENDS="slitaz-toolchain"
11 WANTED="linux"
12 WEB_SITE="http://kernel.org/"
13 KVERSION=$BASEVER-slitaz
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 local path
19 _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
20 AUFSDIR="$WOK/$WANTED/aufs-${_AUFSVER}"
21 path=usr/src/linux-$KVERSION
22 mkdir -p $fs/lib/modules/$KVERSION
23 ln -sf /$path $fs/lib/modules/$KVERSION/build
24 install -D -m644 $src/Makefile \
25 $fs/$path/Makefile
26 install -D -m644 $src/kernel/Makefile \
27 $fs/$path/kernel/Makefile
28 install -D -m644 $src/.config \
29 $fs/$path/.config
30 mkdir -p $fs/$path/include
32 for i in acpi asm-generic config crypto drm generated linux math-emu \
33 media net pcmcia scsi sound trace video xen; do
34 cp -a $src/include/$i $fs/$path/include/
35 done
37 # copy arch includes for external modules
38 mkdir -p $fs/$path/arch/x86
39 cp -a $src/arch/x86/include $fs/$path/arch/x86/
41 # copy files necessary for later builds, like nvidia and vmware
42 cp -a $src/Module.symvers-modules $fs/$path/Module.symvers
43 cp -a $src/scripts $fs/$path
44 # fix permissions on scripts dir
45 chmod og-w -R $fs/$path/scripts
46 mkdir -p $fs/$path/.tmp_versions
48 mkdir -p $fs/$path/arch/x86/kernel
49 cp -a $src/arch/x86/Makefile $fs/$path/arch/x86/
50 cp -a $src/arch/x86/Makefile_32.cpu $fs/$path/arch/x86/
51 cp -a $src/arch/x86/kernel/asm-offsets.s $fs/$path/arch/x86/kernel/
53 # add headers for lirc package
54 mkdir -p $fs/$path/drivers/media/video
55 cp -a $src/drivers/media/video/*.h $fs/$path/drivers/media/video/
57 for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 ; do
58 mkdir -p $fs/$path/drivers/media/video/$i
59 cp -a $src/drivers/media/video/$i/*.h $fs/$path/drivers/media/video/$i
60 done
62 # add docbook makefile
63 install -D -m644 $src/Documentation/DocBook/Makefile \
64 $fs/$path/Documentation/DocBook/Makefile
66 # add dm headers
67 mkdir -p $fs/$path/drivers/md
68 cp -a $src/drivers/md/*.h $fs/$path/drivers/md
70 # add inotify.h
71 mkdir -p $fs/$path/include/linux
72 cp -a $src/include/linux/inotify.h $fs/$path/include/linux/
74 # add wireless headers
75 mkdir -p $fs/$path/net/mac80211/
76 cp -a $src/net/mac80211/*.h $fs/$path/net/mac80211/
78 # add dvb headers for external modules
79 # in reference to:
80 # http://bugs.archlinux.org/task/9912
81 mkdir -p $fs/$path/drivers/media/dvb/dvb-core
82 cp -a $src/drivers/media/dvb/dvb-core/*.h $fs/$path/drivers/media/dvb/dvb-core/
84 # add dvb headers for external modules
85 # in reference to:
86 # http://bugs.archlinux.org/task/11194
87 if [ -d $src/include/config/dvb/ ]; then
88 mkdir -p $fs/$path/include/config/dvb/
89 cp $src/include/config/dvb/*.h $fs/$path/include/config/dvb/
90 fi
92 # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
93 # in reference to:
94 # http://bugs.archlinux.org/task/13146
95 mkdir -p $fs/$path/drivers/media/dvb/frontends/
96 cp -a $src/drivers/media/dvb/frontends/lgdt330x.h $fs/$path/drivers/media/dvb/frontends/
97 cp -a $src/drivers/media/video/msp3400-driver.h $fs/$path/drivers/media/dvb/frontends/
99 # add dvb headers
100 # in reference to:
101 # http://bugs.archlinux.org/task/20402
102 mkdir -p $fs/$path/drivers/media/dvb/dvb-usb
103 cp -a $src/drivers/media/dvb/dvb-usb/*.h $fs/$path/drivers/media/dvb/dvb-usb/
104 mkdir -p $fs/$path/drivers/media/dvb/frontends
105 cp -a $src/drivers/media/dvb/frontends/*.h $fs/$path/drivers/media/dvb/frontends/
106 mkdir -p $fs/$path/drivers/media/common/tuners
107 cp -a $src/drivers/media/common/tuners/*.h $fs/$path/drivers/media/common/tuners/
109 # add xfs and shmem for aufs building
110 mkdir -p $fs/$path/fs/xfs
111 mkdir -p $fs/$path/mm
112 cp -a $src/fs/xfs/xfs_sb.h $fs/$path/fs/xfs/xfs_sb.h
114 # copy in Kconfig files
115 for i in $(find . -name "Kconfig*"); do
116 mkdir -p $fs/$path/$(echo $i | sed 's|/Kconfig.*||')
117 cp -a $src/$i $fs/$path/$i
118 done
120 chown -R root.root $fs/$path
121 find $fs/$path -type d -exec chmod 755 {} \;
122 # remove unneeded architectures
123 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}
125 }
127 pre_remove() {
128 if [ -e $1/usr/src/linux ]; then
129 rm -rf $1/usr/src/linux
130 fi
131 }
133 post_install() {
134 # Added soft link to make it easier to point to kernel folder
135 [ -L $1/usr/src/linux ] && rm -f $1/usr/src/linux
136 ln -sf /usr/src/linux-$KVERSION $1/usr/src/linux
137 }