wok view aufs/receipt @ rev 8186

imported patch toolchain/glibc-dev.patch
author Antoine Bodin <gokhlayeh@slitaz.org>
date Thu Jan 27 00:20:50 2011 +0100 (2011-01-27)
parents c2cbedd53fdc
children f924946538db
line source
1 # SliTaz package receipt.
3 PACKAGE="aufs"
4 VERSION="20110124"
5 CATEGORY="base-system"
6 SHORT_DESC="aufs2 kernel module"
7 MAINTAINER="slaxemulator@gmail.com"
8 DEPENDS="linux"
9 BUILD_DEPENDS="linux-module-headers git lzma"
10 WEB_SITE="http://aufs.sf.net/"
11 PROVIDE="linux-aufs"
13 # Rules to configure and make the package.
14 compile_rules()
15 {
16 AUFSDIR="$PACKAGE-$VERSION"
17 TARBALL=$SOURCES_REPOSITORY/$PACKAGE-$VERSION.tar.lzma
18 if [ -f $TARBALL ]; then
19 unlzma -c $TARBALL | tar xf -
20 cd $AUFSDIR && git checkout origin/aufs2.1-37
21 else
22 # Aufs2 from git repository
23 git clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs2-standalone.git $AUFSDIR
24 tar cf - $AUFSDIR | lzma e $TARBALL -si
25 cd $AUFSDIR && git checkout origin/aufs2.1-37
26 fi
27 cd $src
29 sed -i 's|CONFIG_AUFS_BRANCH_MAX_127 =.*|CONFIG_AUFS_BRANCH_MAX_127 =|' \
30 config.mk || return 1
31 sed -i 's|CONFIG_AUFS_BRANCH_MAX_1023 =.*|CONFIG_AUFS_BRANCH_MAX_1023 = y|' \
32 config.mk || return 1
33 sed -i 's|CONFIG_AUFS_HNOTIFY =.*|CONFIG_AUFS_HNOTIFY = y|' \
34 config.mk || return 1
35 sed -i 's|CONFIG_AUFS_HFSNOTIFY =.*|CONFIG_AUFS_HFSNOTIFY = y|' \
36 config.mk || return 1
37 sed -i 's|CONFIG_AUFS_EXPORT =.*|CONFIG_AUFS_EXPORT = y|' \
38 config.mk || return 1
39 sed -i 's|CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \
40 config.mk || return 1
41 sed -i 's|CONFIG_AUFS_BDEV_LOOP =.*|CONFIG_AUFS_BDEV_LOOP = y|' \
42 config.mk || return 1
43 sed -i 's|CONFIG_AUFS_BR_RAMFS =.*|CONFIG_AUFS_BR_RAMFS = y|' \
44 config.mk || return 1
45 sed -i 's|CONFIG_AUFS_DEBUG =.*|CONFIG_AUFS_DEBUG =|' \
46 config.mk || return 1
48 #patch -Np1 -i ../stuff/aufs2-module-2.6.36.patch
49 #make KDIR=/usr/src/linux clean
50 # build, sed fixes are from gentoo portage build
51 sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile
52 sed -i "s:__user::g" include/linux/aufs_type.h
53 make -j 1 KDIR=/usr/src/linux
54 }
56 # Rules to gen a SliTaz package suitable for Tazpkg.
57 genpkg_rules()
58 {
59 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
60 EXTRAVERSION=_$KERNEL_VERSION
61 mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs
62 lzma e $src/fs/aufs/aufs.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz
63 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz
64 chown 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz
65 install -D -m 644 $src/include/linux/aufs_type.h $fs/usr/include/linux/aufs_type.h
67 }
69 post_install()
70 {
71 echo "Processing post-install commands..."
72 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
73 }
75 post_remove()
76 {
77 echo "Processing post-remove commands..."
78 depmod -a
79 }