wok-6.x annotate aufs/receipt @ rev 15637

aufs: run xz in compile_rules
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Dec 09 20:16:16 2013 +0000 (2013-12-09)
parents 7896f0694ef6
children 773c1b6e7f21
rev   line source
slaxemulator@7297 1 # SliTaz package receipt.
slaxemulator@7297 2
slaxemulator@7297 3 PACKAGE="aufs"
pascal@14179 4 VERSION="20130311"
slaxemulator@7297 5 CATEGORY="base-system"
pankso@12285 6 SHORT_DESC="aufs3 kernel module"
slaxemulator@7297 7 MAINTAINER="slaxemulator@gmail.com"
pascal@15002 8 LICENSE="GPL2"
pankso@9730 9 WEB_SITE="http://aufs.sf.net/"
pankso@9730 10 PROVIDE="linux-aufs"
pankso@9730 11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pankso@12285 12 WGET_URL="git|git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git"
pascal@13939 13 BRANCH="origin/${PACKAGE}3.2"
pankso@12285 14 COOK_OPT="!remove_src"
pankso@9730 15
slaxemulator@7297 16 DEPENDS="linux"
pascal@13278 17 BUILD_DEPENDS="linux-module-headers git xz"
slaxemulator@7297 18
slaxemulator@7297 19 # Rules to configure and make the package.
slaxemulator@7297 20 compile_rules()
slaxemulator@7297 21 {
slaxemulator@7297 22 cd $src
slaxemulator@7297 23
slaxemulator@7297 24 sed -i 's|CONFIG_AUFS_BRANCH_MAX_127 =.*|CONFIG_AUFS_BRANCH_MAX_127 =|' \
slaxemulator@7297 25 config.mk || return 1
slaxemulator@9559 26 sed -i 's|#CONFIG_AUFS_BRANCH_MAX_32767 =.*|CONFIG_AUFS_BRANCH_MAX_32767 = y|' \
slaxemulator@7297 27 config.mk || return 1
slaxemulator@7297 28 sed -i 's|CONFIG_AUFS_HNOTIFY =.*|CONFIG_AUFS_HNOTIFY = y|' \
slaxemulator@7297 29 config.mk || return 1
slaxemulator@7297 30 sed -i 's|CONFIG_AUFS_HFSNOTIFY =.*|CONFIG_AUFS_HFSNOTIFY = y|' \
slaxemulator@7297 31 config.mk || return 1
slaxemulator@7297 32 sed -i 's|CONFIG_AUFS_EXPORT =.*|CONFIG_AUFS_EXPORT = y|' \
slaxemulator@7297 33 config.mk || return 1
slaxemulator@7297 34 sed -i 's|CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \
slaxemulator@7297 35 config.mk || return 1
slaxemulator@7297 36 sed -i 's|CONFIG_AUFS_BDEV_LOOP =.*|CONFIG_AUFS_BDEV_LOOP = y|' \
slaxemulator@7297 37 config.mk || return 1
slaxemulator@7297 38 sed -i 's|CONFIG_AUFS_BR_RAMFS =.*|CONFIG_AUFS_BR_RAMFS = y|' \
slaxemulator@7297 39 config.mk || return 1
slaxemulator@7297 40 sed -i 's|CONFIG_AUFS_DEBUG =.*|CONFIG_AUFS_DEBUG =|' \
slaxemulator@7297 41 config.mk || return 1
slaxemulator@7297 42
pankso@10669 43 # The sed fixes are from gentoo portage build.
slaxemulator@8143 44 sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile
slaxemulator@8143 45 sed -i "s:__user::g" include/linux/aufs_type.h
slaxemulator@8085 46 make -j 1 KDIR=/usr/src/linux
pascal@15637 47 xz fs/aufs/aufs.ko
slaxemulator@7297 48 }
slaxemulator@7297 49
slaxemulator@7297 50 # Rules to gen a SliTaz package suitable for Tazpkg.
slaxemulator@7297 51 genpkg_rules()
slaxemulator@7297 52 {
pankso@12285 53 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
pankso@12285 54 BASEVER=${KERNEL_VERSION:0:3}
pankso@12285 55 EXTRAVERSION=_$BASEVER
pankso@12285 56 mkdir -p $fs/lib/modules/$BASEVER-slitaz/kernel/fs/aufs
pascal@15637 57 cp $src/fs/aufs/aufs.ko.xz $fs/lib/modules/$BASEVER-slitaz/kernel/fs/aufs/
pascal@13278 58 chown root $fs/lib/modules/$BASEVER-slitaz/kernel/fs/aufs/aufs.ko.xz
pascal@13280 59 chmod 0644 $fs/lib/modules/$BASEVER-slitaz/kernel/fs/aufs/aufs.ko.xz
pankso@10669 60 install -D -m 644 $src/include/linux/aufs_type.h \
pankso@12285 61 $fs/usr/include/linux/aufs_type.h
slaxemulator@7297 62 }
slaxemulator@7297 63
slaxemulator@7297 64 post_install()
slaxemulator@7297 65 {
slaxemulator@7297 66 echo "Processing post-install commands..."
slaxemulator@7297 67 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
slaxemulator@7297 68 }
slaxemulator@7297 69
slaxemulator@7297 70 post_remove()
slaxemulator@7297 71 {
slaxemulator@7297 72 echo "Processing post-remove commands..."
slaxemulator@8245 73 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
slaxemulator@8085 74 }