wok rev 6707

Added linux-module-headers. This is used to build 3rd party kernel modules. This is based on archlinux kernel26-headers PKGBUILD.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Oct 13 23:49:38 2010 +0000 (2010-10-13)
parents fa77832f62ce
children 8e40e7c30d5c
files linux-module-headers/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/linux-module-headers/receipt	Wed Oct 13 23:49:38 2010 +0000
     1.3 @@ -0,0 +1,131 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="linux-module-headers"
     1.7 +VERSION="2.6.34"
     1.8 +CATEGORY="development"
     1.9 +SHORT_DESC="Header files and scripts for building modules for linux kernel."
    1.10 +MAINTAINER="slaxemulator@gmail.com"
    1.11 +DEPENDS="slitaz-toolchain"
    1.12 +WANTED="linux"
    1.13 +WEB_SITE="http://kernel.org/"
    1.14 +KVERSION=$VERSION-slitaz
    1.15 +
    1.16 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.17 +genpkg_rules()
    1.18 +{
    1.19 +	local path
    1.20 +	path=usr/src/linux-$KVERSION
    1.21 +	mkdir -p $fs/lib/modules/$KVERSION
    1.22 +	ln -sf $path $fs/lib/modules/$KVERSION/build
    1.23 +	install -D -m644 $src/Makefile \
    1.24 +		$fs/$path/Makefile
    1.25 +	install -D -m644 $src/kernel/Makefile \
    1.26 +		$fs/$path/kernel/Makefile
    1.27 +	install -D -m644 $src/.config \
    1.28 +		$fs/$path/.config
    1.29 +	mkdir -p $fs/$path/include
    1.30 +
    1.31 +	for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video; do
    1.32 +		cp -a $src/include/$i $fs/$path/include/
    1.33 +	done
    1.34 +
    1.35 +	# copy arch includes for external modules
    1.36 +	mkdir -p $fs/$path/arch/x86
    1.37 +	cp -a $src/arch/x86/include $fs/$path/arch/x86/
    1.38 +
    1.39 +	# copy files necessary for later builds, like nvidia and vmware
    1.40 +  	cp -a $src/Module.symvers $fs/$path
    1.41 +  	cp -a $src/scripts $fs/$path
    1.42 +  	# fix permissions on scripts dir
    1.43 +  	chmod og-w -R $fs/$path/scripts
    1.44 +  	mkdir -p $fs/$path/.tmp_versions
    1.45 +
    1.46 +	mkdir -p $fs/$path/arch/x86/kernel
    1.47 +	cp -a $src/arch/x86/Makefile $fs/$path/arch/x86/
    1.48 +	cp -a $src/arch/x86/Makefile_32.cpu $fs/$path/arch/x86/
    1.49 +	cp -a $src/arch/x86/kernel/asm-offsets.s $fs/$path/arch/x86/kernel/
    1.50 +
    1.51 +	# add headers for lirc package
    1.52 +	mkdir -p $fs/$path/drivers/media/video
    1.53 +	cp -a $src/drivers/media/video/*.h  $fs/$path/drivers/media/video/
    1.54 +
    1.55 +	for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
    1.56 +   		mkdir -p $fs/$path/drivers/media/video/$i
    1.57 +   		cp -a $src/drivers/media/video/$i/*.h $fs/$path/drivers/media/video/$i
    1.58 +	done
    1.59 +
    1.60 +	# add docbook makefile
    1.61 +	install -D -m644 $src/Documentation/DocBook/Makefile \
    1.62 +    		$fs/$path/Documentation/DocBook/Makefile
    1.63 +
    1.64 +	# add dm headers
    1.65 +	mkdir -p $fs/$path/drivers/md
    1.66 +	cp -a $src/drivers/md/*.h  $fs/$path/drivers/md
    1.67 +
    1.68 +	# add inotify.h
    1.69 +	mkdir -p $fs/$path/include/linux
    1.70 +	cp -a $src/include/linux/inotify.h $fs/$path/include/linux/
    1.71 +
    1.72 +	# add wireless headers
    1.73 +	mkdir -p $fs/$path/net/mac80211/
    1.74 +	cp -a $src/net/mac80211/*.h $fs/$path/net/mac80211/
    1.75 +
    1.76 +	# add dvb headers for external modules
    1.77 +	# in reference to:
    1.78 +	# http://bugs.archlinux.org/task/9912
    1.79 +	mkdir -p $fs/$path/drivers/media/dvb/dvb-core
    1.80 +	cp -a $src/drivers/media/dvb/dvb-core/*.h $fs/$path/drivers/media/dvb/dvb-core/
    1.81 +
    1.82 +	# add dvb headers for external modules
    1.83 +	# in reference to:
    1.84 +	# http://bugs.archlinux.org/task/11194
    1.85 +	if [ -d $src/include/config/dvb/ ]; then
    1.86 +		mkdir -p $fs/$path/include/config/dvb/
    1.87 +		cp $src/include/config/dvb/*.h $fs/$path/include/config/dvb/
    1.88 +	fi
    1.89 +
    1.90 +	# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
    1.91 +	# in reference to:
    1.92 +	# http://bugs.archlinux.org/task/13146
    1.93 +	mkdir -p $fs/$path/drivers/media/dvb/frontends/
    1.94 +	cp -a $src/drivers/media/dvb/frontends/lgdt330x.h $fs/$path/drivers/media/dvb/frontends/
    1.95 +	cp -a $src/drivers/media/video/msp3400-driver.h $fs/$path/drivers/media/dvb/frontends/
    1.96 +
    1.97 +	# add dvb headers  
    1.98 +	# in reference to:
    1.99 +	# http://bugs.archlinux.org/task/20402
   1.100 +	mkdir -p $fs/$path/drivers/media/dvb/dvb-usb
   1.101 +	cp -a $src/drivers/media/dvb/dvb-usb/*.h $fs/$path/drivers/media/dvb/dvb-usb/
   1.102 +	mkdir -p $fs/$path/drivers/media/dvb/frontends
   1.103 +	cp -a $src/drivers/media/dvb/frontends/*.h $fs/$path/drivers/media/dvb/frontends/
   1.104 +	mkdir -p $fs/$path/drivers/media/common/tuners
   1.105 +	cp -a $src/drivers/media/common/tuners/*.h $fs/$path/drivers/media/common/tuners/
   1.106 +
   1.107 +	# add xfs and shmem for aufs building
   1.108 +	mkdir -p $fs/$path/fs/xfs
   1.109 +	mkdir -p $fs/$path/mm
   1.110 +	cp -a $src/fs/xfs/xfs_sb.h $fs/$path/fs/xfs/xfs_sb.h
   1.111 +
   1.112 +	# add headers vor virtualbox
   1.113 +	# in reference to:
   1.114 +	# http://bugs.archlinux.org/task/14568
   1.115 +	cp -a $src/include/drm $fs/$path/include/
   1.116 +
   1.117 +	# add headers for broadcom wl
   1.118 +	# in reference to:
   1.119 +	# http://bugs.archlinux.org/task/14568
   1.120 +	cp -a $src/include/trace $fs/$path/include/
   1.121 +
   1.122 +	# copy in Kconfig files
   1.123 +	for i in $(find . -name "Kconfig*"); do 
   1.124 +		mkdir -p $fs/$path/$(echo $i | sed 's|/Kconfig.*||')
   1.125 +		cp -a $src/$i $fs/$path/$i
   1.126 +  done
   1.127 +
   1.128 +	chown -R root.root $fs/$path
   1.129 +	find $fs/$path -type d -exec chmod 755 {} \;
   1.130 +	# remove unneeded architectures
   1.131 +	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.132 +
   1.133 +}	
   1.134 +