wok view linux-module-headers/receipt @ rev 7869

Up: wordpress to 3.0.4.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Jan 02 19:38:10 2011 +0000 (2011-01-02)
parents 645cf2faf482
children 03d4663c81fa
line source
1 # SliTaz package receipt.
3 PACKAGE="linux-module-headers"
4 VERSION="2.6.36"
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; 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/
119 # copy in Kconfig files
120 for i in $(find . -name "Kconfig*"); do
121 mkdir -p $fs/$path/$(echo $i | sed 's|/Kconfig.*||')
122 cp -a $src/$i $fs/$path/$i
123 done
125 chown -R root.root $fs/$path
126 find $fs/$path -type d -exec chmod 755 {} \;
127 # remove unneeded architectures
128 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}
130 }
132 pre_remove() {
133 if [ -e $1/usr/src/linux ]; then
134 rm -rf $1/usr/src/linux
135 fi
136 }
138 post_install() {
139 # Added soft link to make it easier to point to kernel folder
140 ln -sf /usr/src/linux-$KVERSION $1/usr/src/linux
141 }