wok diff linux-libre-module-headers/receipt @ rev 13517

Up vpnc (0.5.3)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Oct 19 10:47:03 2012 +0200 (2012-10-19)
parents
children 03a6791abff6
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/linux-libre-module-headers/receipt	Fri Oct 19 10:47:03 2012 +0200
     1.3 @@ -0,0 +1,148 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="linux-libre-module-headers"
     1.7 +VERSION="2.6.37-libre"
     1.8 +CATEGORY="development"
     1.9 +SHORT_DESC="Header files and scripts for building modules for Linux Libre kernel."
    1.10 +MAINTAINER="gokhlayeh@slitaz.org"
    1.11 +PROVIDE="linux-module-headers"
    1.12 +DEPENDS="slitaz-toolchain"
    1.13 +WANTED="linux-libre"
    1.14 +WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/"
    1.15 +KVERSION=$VERSION-slitaz
    1.16 +
    1.17 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.18 +genpkg_rules()
    1.19 +{
    1.20 +	local path
    1.21 +	_AUFSVER=`grep  ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    1.22 +	AUFSDIR="$WOK/$WANTED/aufs-${_AUFSVER}"
    1.23 +	path=usr/src/linux-$KVERSION
    1.24 +	mkdir -p $fs/lib/modules/$KVERSION
    1.25 +	ln -sf /$path $fs/lib/modules/$KVERSION/build
    1.26 +	install -D -m644 $src/Makefile \
    1.27 +		$fs/$path/Makefile
    1.28 +	install -D -m644 $src/kernel/Makefile \
    1.29 +		$fs/$path/kernel/Makefile
    1.30 +	install -D -m644 $src/.config \
    1.31 +		$fs/$path/.config
    1.32 +	mkdir -p $fs/$path/include
    1.33 +
    1.34 +	for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video xen; do
    1.35 +		cp -a $src/include/$i $fs/$path/include/
    1.36 +	done
    1.37 +
    1.38 +	# copy arch includes for external modules
    1.39 +	mkdir -p $fs/$path/arch/x86
    1.40 +	cp -a $src/arch/x86/include $fs/$path/arch/x86/
    1.41 +
    1.42 +	# copy files necessary for later builds, like nvidia and vmware
    1.43 +  	cp -a $src/Module.symvers-modules $fs/$path/Module.symvers
    1.44 +  	cp -a $src/scripts $fs/$path
    1.45 +  	# fix permissions on scripts dir
    1.46 +  	chmod og-w -R $fs/$path/scripts
    1.47 +  	mkdir -p $fs/$path/.tmp_versions
    1.48 +
    1.49 +	mkdir -p $fs/$path/arch/x86/kernel
    1.50 +	cp -a $src/arch/x86/Makefile $fs/$path/arch/x86/
    1.51 +	cp -a $src/arch/x86/Makefile_32.cpu $fs/$path/arch/x86/
    1.52 +	cp -a $src/arch/x86/kernel/asm-offsets.s $fs/$path/arch/x86/kernel/
    1.53 +
    1.54 +	# add headers for lirc package
    1.55 +	mkdir -p $fs/$path/drivers/media/video
    1.56 +	cp -a $src/drivers/media/video/*.h  $fs/$path/drivers/media/video/
    1.57 +
    1.58 +	for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo ; do
    1.59 +   		mkdir -p $fs/$path/drivers/media/video/$i
    1.60 +   		cp -a $src/drivers/media/video/$i/*.h $fs/$path/drivers/media/video/$i
    1.61 +	done
    1.62 +
    1.63 +	# add docbook makefile
    1.64 +	install -D -m644 $src/Documentation/DocBook/Makefile \
    1.65 +    		$fs/$path/Documentation/DocBook/Makefile
    1.66 +
    1.67 +	# add dm headers
    1.68 +	mkdir -p $fs/$path/drivers/md
    1.69 +	cp -a $src/drivers/md/*.h  $fs/$path/drivers/md
    1.70 +
    1.71 +	# add inotify.h
    1.72 +	mkdir -p $fs/$path/include/linux
    1.73 +	cp -a $src/include/linux/inotify.h $fs/$path/include/linux/
    1.74 +
    1.75 +	# add wireless headers
    1.76 +	mkdir -p $fs/$path/net/mac80211/
    1.77 +	cp -a $src/net/mac80211/*.h $fs/$path/net/mac80211/
    1.78 +
    1.79 +	# add dvb headers for external modules
    1.80 +	# in reference to:
    1.81 +	# http://bugs.archlinux.org/task/9912
    1.82 +	mkdir -p $fs/$path/drivers/media/dvb/dvb-core
    1.83 +	cp -a $src/drivers/media/dvb/dvb-core/*.h $fs/$path/drivers/media/dvb/dvb-core/
    1.84 +
    1.85 +	# add dvb headers for external modules
    1.86 +	# in reference to:
    1.87 +	# http://bugs.archlinux.org/task/11194
    1.88 +	if [ -d $src/include/config/dvb/ ]; then
    1.89 +		mkdir -p $fs/$path/include/config/dvb/
    1.90 +		cp $src/include/config/dvb/*.h $fs/$path/include/config/dvb/
    1.91 +	fi
    1.92 +
    1.93 +	# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
    1.94 +	# in reference to:
    1.95 +	# http://bugs.archlinux.org/task/13146
    1.96 +	mkdir -p $fs/$path/drivers/media/dvb/frontends/
    1.97 +	cp -a $src/drivers/media/dvb/frontends/lgdt330x.h $fs/$path/drivers/media/dvb/frontends/
    1.98 +	cp -a $src/drivers/media/video/msp3400-driver.h $fs/$path/drivers/media/dvb/frontends/
    1.99 +
   1.100 +	# add dvb headers  
   1.101 +	# in reference to:
   1.102 +	# http://bugs.archlinux.org/task/20402
   1.103 +	mkdir -p $fs/$path/drivers/media/dvb/dvb-usb
   1.104 +	cp -a $src/drivers/media/dvb/dvb-usb/*.h $fs/$path/drivers/media/dvb/dvb-usb/
   1.105 +	mkdir -p $fs/$path/drivers/media/dvb/frontends
   1.106 +	cp -a $src/drivers/media/dvb/frontends/*.h $fs/$path/drivers/media/dvb/frontends/
   1.107 +	mkdir -p $fs/$path/drivers/media/common/tuners
   1.108 +	cp -a $src/drivers/media/common/tuners/*.h $fs/$path/drivers/media/common/tuners/
   1.109 +
   1.110 +	# add xfs and shmem for aufs building
   1.111 +	mkdir -p $fs/$path/fs/xfs
   1.112 +	mkdir -p $fs/$path/mm
   1.113 +	cp -a $src/fs/xfs/xfs_sb.h $fs/$path/fs/xfs/xfs_sb.h
   1.114 +	
   1.115 +	# add headers vor virtualbox
   1.116 +	# in reference to:
   1.117 +	# http://bugs.archlinux.org/task/14568
   1.118 +	cp -a $src/include/drm $fs/$path/include/
   1.119 +
   1.120 +	# add headers for broadcom wl
   1.121 +	# in reference to:
   1.122 +	# http://bugs.archlinux.org/task/14568
   1.123 +	cp -a $src/include/trace $fs/$path/include/
   1.124 +	# add headers for crypto modules
   1.125 +	# in reference to:
   1.126 +	# http://bugs.archlinux.org/task/22081
   1.127 +	cp -a $src/include/crypto $fs/$path/include/
   1.128 +	# copy in Kconfig files
   1.129 +	for i in $(find . -name "Kconfig*"); do 
   1.130 +		mkdir -p $fs/$path/$(echo $i | sed 's|/Kconfig.*||')
   1.131 +		cp -a $src/$i $fs/$path/$i
   1.132 +	done
   1.133 +
   1.134 +	chown -R root.root $fs/$path
   1.135 +	find $fs/$path -type d -exec chmod 755 {} \;
   1.136 +	# remove unneeded architectures
   1.137 +	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}
   1.138 +
   1.139 +}	
   1.140 +
   1.141 +pre_remove() {
   1.142 +	if [ -e $1/usr/src/linux ]; then
   1.143 +		rm -rf $1/usr/src/linux
   1.144 +	fi
   1.145 +}
   1.146 +
   1.147 +post_install() {
   1.148 +	# Added soft link to make it easier to point to kernel folder
   1.149 +	[ -L $1/usr/src/linux ] && rm -f $1/usr/src/linux 
   1.150 +	ln -sf /usr/src/linux-$KVERSION $1/usr/src/linux
   1.151 +}