wok-6.x view linux-libre-module-headers/receipt @ rev 9320

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