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