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