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

updated mrxvt (0.4.2 -> 0.5.4)
author Hans-G?nter Theisgen
date Wed May 01 14:18:28 2019 +0100 (2019-05-01)
parents 9e8d7fd12ee2
children
rev   line source
gokhlayeh@9257 1 # SliTaz package receipt.
gokhlayeh@9257 2
gokhlayeh@9257 3 PACKAGE="linux-libre-module-headers"
pascal@20604 4 VERSION="3.18.129-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 path=usr/src/linux-$KVERSION
gokhlayeh@9257 20 mkdir -p $fs/lib/modules/$KVERSION
gokhlayeh@9257 21 ln -sf /$path $fs/lib/modules/$KVERSION/build
gokhlayeh@9257 22 install -D -m644 $src/Makefile \
gokhlayeh@9257 23 $fs/$path/Makefile
gokhlayeh@9257 24 install -D -m644 $src/kernel/Makefile \
gokhlayeh@9257 25 $fs/$path/kernel/Makefile
gokhlayeh@9257 26 install -D -m644 $src/.config \
gokhlayeh@9257 27 $fs/$path/.config
gokhlayeh@9257 28 mkdir -p $fs/$path/include
gokhlayeh@9257 29
gokhlayeh@9257 30 for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video xen; do
gokhlayeh@9257 31 cp -a $src/include/$i $fs/$path/include/
gokhlayeh@9257 32 done
gokhlayeh@9257 33
gokhlayeh@9257 34 # copy arch includes for external modules
gokhlayeh@9257 35 mkdir -p $fs/$path/arch/x86
gokhlayeh@9257 36 cp -a $src/arch/x86/include $fs/$path/arch/x86/
gokhlayeh@9257 37
gokhlayeh@9257 38 # copy files necessary for later builds, like nvidia and vmware
gokhlayeh@9257 39 cp -a $src/Module.symvers-modules $fs/$path/Module.symvers
gokhlayeh@9257 40 cp -a $src/scripts $fs/$path
gokhlayeh@9257 41 # fix permissions on scripts dir
gokhlayeh@9257 42 chmod og-w -R $fs/$path/scripts
gokhlayeh@9257 43 mkdir -p $fs/$path/.tmp_versions
gokhlayeh@9257 44
gokhlayeh@9257 45 mkdir -p $fs/$path/arch/x86/kernel
gokhlayeh@9257 46 cp -a $src/arch/x86/Makefile $fs/$path/arch/x86/
gokhlayeh@9257 47 cp -a $src/arch/x86/Makefile_32.cpu $fs/$path/arch/x86/
gokhlayeh@9257 48 cp -a $src/arch/x86/kernel/asm-offsets.s $fs/$path/arch/x86/kernel/
gokhlayeh@9257 49
gokhlayeh@9257 50 # add headers for lirc package
gokhlayeh@9257 51 mkdir -p $fs/$path/drivers/media/video
gokhlayeh@9257 52
gokhlayeh@9257 53 # add docbook makefile
gokhlayeh@9257 54 install -D -m644 $src/Documentation/DocBook/Makefile \
gokhlayeh@9257 55 $fs/$path/Documentation/DocBook/Makefile
gokhlayeh@9257 56
gokhlayeh@9257 57 # add dm headers
gokhlayeh@9257 58 mkdir -p $fs/$path/drivers/md
gokhlayeh@9257 59 cp -a $src/drivers/md/*.h $fs/$path/drivers/md
gokhlayeh@9257 60
gokhlayeh@9257 61 # add inotify.h
gokhlayeh@9257 62 mkdir -p $fs/$path/include/linux
gokhlayeh@9257 63 cp -a $src/include/linux/inotify.h $fs/$path/include/linux/
gokhlayeh@9257 64
gokhlayeh@9257 65 # add wireless headers
gokhlayeh@9257 66 mkdir -p $fs/$path/net/mac80211/
gokhlayeh@9257 67 cp -a $src/net/mac80211/*.h $fs/$path/net/mac80211/
gokhlayeh@9257 68
gokhlayeh@9257 69 # add dvb headers for external modules
gokhlayeh@9257 70 # in reference to:
gokhlayeh@9257 71 # http://bugs.archlinux.org/task/9912
gokhlayeh@9257 72 mkdir -p $fs/$path/drivers/media/dvb/dvb-core
gokhlayeh@9257 73
gokhlayeh@9257 74 # add dvb headers for external modules
gokhlayeh@9257 75 # in reference to:
gokhlayeh@9257 76 # http://bugs.archlinux.org/task/11194
gokhlayeh@9257 77 if [ -d $src/include/config/dvb/ ]; then
gokhlayeh@9257 78 mkdir -p $fs/$path/include/config/dvb/
gokhlayeh@9257 79 cp $src/include/config/dvb/*.h $fs/$path/include/config/dvb/
gokhlayeh@9257 80 fi
gokhlayeh@9257 81
gokhlayeh@9257 82 # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
gokhlayeh@9257 83 # in reference to:
gokhlayeh@9257 84 # http://bugs.archlinux.org/task/13146
gokhlayeh@9257 85 mkdir -p $fs/$path/drivers/media/dvb/frontends/
gokhlayeh@9257 86
gokhlayeh@9257 87 # add dvb headers
gokhlayeh@9257 88 # in reference to:
gokhlayeh@9257 89 # http://bugs.archlinux.org/task/20402
gokhlayeh@9257 90 mkdir -p $fs/$path/drivers/media/dvb/dvb-usb
gokhlayeh@9257 91 mkdir -p $fs/$path/drivers/media/dvb/frontends
gokhlayeh@9257 92 mkdir -p $fs/$path/drivers/media/common/tuners
gokhlayeh@9257 93
gokhlayeh@9257 94 # add xfs and shmem for aufs building
gokhlayeh@9257 95 mkdir -p $fs/$path/fs/xfs
gokhlayeh@9257 96 mkdir -p $fs/$path/mm
gokhlayeh@9257 97
gokhlayeh@9257 98 # add headers vor virtualbox
gokhlayeh@9257 99 # in reference to:
gokhlayeh@9257 100 # http://bugs.archlinux.org/task/14568
gokhlayeh@9257 101 cp -a $src/include/drm $fs/$path/include/
gokhlayeh@9257 102
gokhlayeh@9257 103 # add headers for broadcom wl
gokhlayeh@9257 104 # in reference to:
gokhlayeh@9257 105 # http://bugs.archlinux.org/task/14568
gokhlayeh@9257 106 cp -a $src/include/trace $fs/$path/include/
gokhlayeh@9257 107 # add headers for crypto modules
gokhlayeh@9257 108 # in reference to:
gokhlayeh@9257 109 # http://bugs.archlinux.org/task/22081
gokhlayeh@9257 110 cp -a $src/include/crypto $fs/$path/include/
gokhlayeh@9257 111 # copy in Kconfig files
gokhlayeh@9257 112 for i in $(find . -name "Kconfig*"); do
gokhlayeh@9257 113 mkdir -p $fs/$path/$(echo $i | sed 's|/Kconfig.*||')
gokhlayeh@9257 114 cp -a $src/$i $fs/$path/$i
gokhlayeh@9257 115 done
gokhlayeh@9257 116
gokhlayeh@9257 117 chown -R root.root $fs/$path
gokhlayeh@9257 118 find $fs/$path -type d -exec chmod 755 {} \;
gokhlayeh@9257 119 # remove unneeded architectures
gokhlayeh@9257 120 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 121
gokhlayeh@9257 122 }
gokhlayeh@9257 123
gokhlayeh@9257 124 pre_remove() {
pascal@18730 125 if [ -e "$1/usr/src/linux" ]; then
pascal@18730 126 rm -rf "$1/usr/src/linux"
gokhlayeh@9257 127 fi
gokhlayeh@9257 128 }
gokhlayeh@9257 129
gokhlayeh@9257 130 post_install() {
gokhlayeh@9257 131 # Added soft link to make it easier to point to kernel folder
pascal@18730 132 [ -L "$1/usr/src/linux" ] && rm -f "$1/usr/src/linux"
pascal@18730 133 ln -sf /usr/src/linux-$KVERSION "$1/usr/src/linux"
gokhlayeh@9257 134 }