wok-stable view linux-module-headers/receipt @ rev 8123
Up: winetricks to 20110123.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Mon Jan 24 07:54:52 2011 +0000 (2011-01-24) |
parents | 2986d549c750 |
children | e8d99bee75fd |
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 path=usr/src/linux-$KVERSION
18 mkdir -p $fs/lib/modules/$KVERSION
19 ln -sf /$path $fs/lib/modules/$KVERSION/build
20 install -D -m644 $src/Makefile \
21 $fs/$path/Makefile
22 install -D -m644 $src/kernel/Makefile \
23 $fs/$path/kernel/Makefile
24 install -D -m644 $src/.config \
25 $fs/$path/.config
26 mkdir -p $fs/$path/include
28 for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video xen; do
29 cp -a $src/include/$i $fs/$path/include/
30 done
32 # copy arch includes for external modules
33 mkdir -p $fs/$path/arch/x86
34 cp -a $src/arch/x86/include $fs/$path/arch/x86/
36 # copy files necessary for later builds, like nvidia and vmware
37 cp -a $src/Module.symvers-modules $fs/$path/Module.symvers
38 cp -a $src/scripts $fs/$path
39 # fix permissions on scripts dir
40 chmod og-w -R $fs/$path/scripts
41 mkdir -p $fs/$path/.tmp_versions
43 mkdir -p $fs/$path/arch/x86/kernel
44 cp -a $src/arch/x86/Makefile $fs/$path/arch/x86/
45 cp -a $src/arch/x86/Makefile_32.cpu $fs/$path/arch/x86/
46 cp -a $src/arch/x86/kernel/asm-offsets.s $fs/$path/arch/x86/kernel/
48 # add headers for lirc package
49 mkdir -p $fs/$path/drivers/media/video
50 cp -a $src/drivers/media/video/*.h $fs/$path/drivers/media/video/
52 for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
53 mkdir -p $fs/$path/drivers/media/video/$i
54 cp -a $src/drivers/media/video/$i/*.h $fs/$path/drivers/media/video/$i
55 done
57 # add docbook makefile
58 install -D -m644 $src/Documentation/DocBook/Makefile \
59 $fs/$path/Documentation/DocBook/Makefile
61 # add dm headers
62 mkdir -p $fs/$path/drivers/md
63 cp -a $src/drivers/md/*.h $fs/$path/drivers/md
65 # add inotify.h
66 mkdir -p $fs/$path/include/linux
67 cp -a $src/include/linux/inotify.h $fs/$path/include/linux/
69 # add wireless headers
70 mkdir -p $fs/$path/net/mac80211/
71 cp -a $src/net/mac80211/*.h $fs/$path/net/mac80211/
73 # add dvb headers for external modules
74 # in reference to:
75 # http://bugs.archlinux.org/task/9912
76 mkdir -p $fs/$path/drivers/media/dvb/dvb-core
77 cp -a $src/drivers/media/dvb/dvb-core/*.h $fs/$path/drivers/media/dvb/dvb-core/
79 # add dvb headers for external modules
80 # in reference to:
81 # http://bugs.archlinux.org/task/11194
82 if [ -d $src/include/config/dvb/ ]; then
83 mkdir -p $fs/$path/include/config/dvb/
84 cp $src/include/config/dvb/*.h $fs/$path/include/config/dvb/
85 fi
87 # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
88 # in reference to:
89 # http://bugs.archlinux.org/task/13146
90 mkdir -p $fs/$path/drivers/media/dvb/frontends/
91 cp -a $src/drivers/media/dvb/frontends/lgdt330x.h $fs/$path/drivers/media/dvb/frontends/
92 cp -a $src/drivers/media/video/msp3400-driver.h $fs/$path/drivers/media/dvb/frontends/
94 # add dvb headers
95 # in reference to:
96 # http://bugs.archlinux.org/task/20402
97 mkdir -p $fs/$path/drivers/media/dvb/dvb-usb
98 cp -a $src/drivers/media/dvb/dvb-usb/*.h $fs/$path/drivers/media/dvb/dvb-usb/
99 mkdir -p $fs/$path/drivers/media/dvb/frontends
100 cp -a $src/drivers/media/dvb/frontends/*.h $fs/$path/drivers/media/dvb/frontends/
101 mkdir -p $fs/$path/drivers/media/common/tuners
102 cp -a $src/drivers/media/common/tuners/*.h $fs/$path/drivers/media/common/tuners/
104 # add xfs and shmem for aufs building
105 mkdir -p $fs/$path/fs/xfs
106 mkdir -p $fs/$path/mm
107 cp -a $src/fs/xfs/xfs_sb.h $fs/$path/fs/xfs/xfs_sb.h
109 # add headers vor virtualbox
110 # in reference to:
111 # http://bugs.archlinux.org/task/14568
112 cp -a $src/include/drm $fs/$path/include/
114 # add headers for broadcom wl
115 # in reference to:
116 # http://bugs.archlinux.org/task/14568
117 cp -a $src/include/trace $fs/$path/include/
118 # add headers for crypto modules
119 # in reference to:
120 # http://bugs.archlinux.org/task/22081
121 cp -a $src/include/crypto $fs/$path/include/
122 # copy in Kconfig files
123 for i in $(find . -name "Kconfig*"); do
124 mkdir -p $fs/$path/$(echo $i | sed 's|/Kconfig.*||')
125 cp -a $src/$i $fs/$path/$i
126 done
128 chown -R root.root $fs/$path
129 find $fs/$path -type d -exec chmod 755 {} \;
130 # remove unneeded architectures
131 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}
133 }
135 pre_remove() {
136 if [ -e $1/usr/src/linux ]; then
137 rm -rf $1/usr/src/linux
138 fi
139 }
141 post_install() {
142 # Added soft link to make it easier to point to kernel folder
143 [ -L $1/usr/src/linux ] && rm -f $1/usr/src/linux
144 ln -sf /usr/src/linux-$KVERSION $1/usr/src/linux
145 }