wok annotate linux-libre-module-headers/receipt @ rev 12566

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