wok annotate linux-module-headers/receipt @ rev 14848

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