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

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