wok-next diff aufs/receipt @ rev 7396

linmodem-hsfmodem: fix kernel version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Nov 26 18:52:20 2010 +0100 (2010-11-26)
parents
children 5e64ecd01686
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/aufs/receipt	Fri Nov 26 18:52:20 2010 +0100
     1.3 @@ -0,0 +1,75 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="aufs"
     1.7 +VERSION="20101116"
     1.8 +CATEGORY="base-system"
     1.9 +SHORT_DESC="aufs2 kernel module"
    1.10 +MAINTAINER="slaxemulator@gmail.com"
    1.11 +DEPENDS="linux"
    1.12 +BUILD_DEPENDS="linux-module-headers git"
    1.13 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.14 +WEB_SITE="http://aufs.sf.net/"
    1.15 +PROVIDE="linux-aufs"
    1.16 +
    1.17 +# Rules to configure and make the package.
    1.18 +compile_rules()
    1.19 +{
    1.20 +	local AUFSDIR="$PACKAGE-$VERSION"
    1.21 +	TARBALL=$SOURCES_REPOSITORY/$AUFSDIR.tar.gz
    1.22 +	if [ -f $TARBALL ]; then
    1.23 +		tar xzf $TARBALL
    1.24 +		cd $AUFSDIR && git checkout origin/aufs2
    1.25 +	else
    1.26 +		# Aufs2 from git repository
    1.27 +		git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git $AUFSDIR
    1.28 +		tar czf $TARBALL $AUFSDIR
    1.29 +		cd $AUFSDIR && git checkout origin/aufs2	
    1.30 +	fi
    1.31 +	cd $src
    1.32 +
    1.33 +	sed -i 's|CONFIG_AUFS_BRANCH_MAX_127 =.*|CONFIG_AUFS_BRANCH_MAX_127 =|' \
    1.34 +		config.mk || return 1
    1.35 +	sed -i 's|CONFIG_AUFS_BRANCH_MAX_1023 =.*|CONFIG_AUFS_BRANCH_MAX_1023 = y|' \
    1.36 +		config.mk || return 1
    1.37 +	sed -i 's|CONFIG_AUFS_HNOTIFY =.*|CONFIG_AUFS_HNOTIFY = y|' \
    1.38 +		config.mk || return 1
    1.39 +	sed -i 's|CONFIG_AUFS_HFSNOTIFY =.*|CONFIG_AUFS_HFSNOTIFY = y|' \
    1.40 +		config.mk || return 1
    1.41 +	sed -i 's|CONFIG_AUFS_EXPORT =.*|CONFIG_AUFS_EXPORT = y|' \
    1.42 +		config.mk || return 1
    1.43 +	sed -i 's|CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \
    1.44 +		config.mk || return 1
    1.45 +	sed -i 's|CONFIG_AUFS_BDEV_LOOP =.*|CONFIG_AUFS_BDEV_LOOP = y|' \
    1.46 +		config.mk || return 1
    1.47 +	sed -i 's|CONFIG_AUFS_BR_RAMFS =.*|CONFIG_AUFS_BR_RAMFS = y|' \
    1.48 +		config.mk || return 1
    1.49 +	sed -i 's|CONFIG_AUFS_DEBUG =.*|CONFIG_AUFS_DEBUG =|' \
    1.50 +		config.mk || return 1
    1.51 +
    1.52 +	patch -Np1 -i ../stuff/aufs2-module-2.6.36.patch
    1.53 +	#make KDIR=/usr/src/linux clean
    1.54 +	make KDIR=/usr/src/linux
    1.55 +}
    1.56 +
    1.57 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.58 +genpkg_rules()
    1.59 +{
    1.60 +	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    1.61 +	EXTRAVERSION=_$KERNEL_VERSION
    1.62 +	mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs
    1.63 +	lzma e $src/fs/aufs/aufs.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz
    1.64 +	chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz
    1.65 +	chown 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz
    1.66 +}
    1.67 +
    1.68 +post_install()
    1.69 +{
    1.70 +	echo "Processing post-install commands..."
    1.71 +	chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
    1.72 +}
    1.73 +
    1.74 +post_remove()
    1.75 +{
    1.76 +	echo "Processing post-remove commands..."
    1.77 +	depmod -a
    1.78 +}
    1.79 \ No newline at end of file