wok view aufs/receipt @ rev 7974

Fix: net-snmp needs -j1 to install correctly
author Antoine Bodin <gokhlayeh@slitaz.org>
date Mon Jan 17 17:55:29 2011 +0100 (2011-01-17)
parents 35a10ca4f67b
children 03d4663c81fa
line source
1 # SliTaz package receipt.
3 PACKAGE="aufs"
4 VERSION="20101214"
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"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="http://aufs.sf.net/"
12 PROVIDE="linux-aufs"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 local AUFSDIR="$PACKAGE-$VERSION"
18 TARBALL=$SOURCES_REPOSITORY/$AUFSDIR.tar.gz
19 if [ -f $TARBALL ]; then
20 tar xzf $TARBALL
21 cd $AUFSDIR && git checkout origin/aufs2.1-36
22 else
23 # Aufs2 from git repository
24 git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git $AUFSDIR
25 tar czf $TARBALL $AUFSDIR
26 cd $AUFSDIR && git checkout origin/aufs2.1-36
27 fi
28 cd $src
30 sed -i 's|CONFIG_AUFS_BRANCH_MAX_127 =.*|CONFIG_AUFS_BRANCH_MAX_127 =|' \
31 config.mk || return 1
32 sed -i 's|CONFIG_AUFS_BRANCH_MAX_1023 =.*|CONFIG_AUFS_BRANCH_MAX_1023 = y|' \
33 config.mk || return 1
34 sed -i 's|CONFIG_AUFS_HNOTIFY =.*|CONFIG_AUFS_HNOTIFY = y|' \
35 config.mk || return 1
36 sed -i 's|CONFIG_AUFS_HFSNOTIFY =.*|CONFIG_AUFS_HFSNOTIFY = y|' \
37 config.mk || return 1
38 sed -i 's|CONFIG_AUFS_EXPORT =.*|CONFIG_AUFS_EXPORT = y|' \
39 config.mk || return 1
40 sed -i 's|CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \
41 config.mk || return 1
42 sed -i 's|CONFIG_AUFS_BDEV_LOOP =.*|CONFIG_AUFS_BDEV_LOOP = y|' \
43 config.mk || return 1
44 sed -i 's|CONFIG_AUFS_BR_RAMFS =.*|CONFIG_AUFS_BR_RAMFS = y|' \
45 config.mk || return 1
46 sed -i 's|CONFIG_AUFS_DEBUG =.*|CONFIG_AUFS_DEBUG =|' \
47 config.mk || return 1
49 #patch -Np1 -i ../stuff/aufs2-module-2.6.36.patch
50 #make KDIR=/usr/src/linux clean
51 make KDIR=/usr/src/linux
52 }
54 # Rules to gen a SliTaz package suitable for Tazpkg.
55 genpkg_rules()
56 {
57 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
58 EXTRAVERSION=_$KERNEL_VERSION
59 mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs
60 lzma e $src/fs/aufs/aufs.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz
61 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz
62 chown 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz
63 }
65 post_install()
66 {
67 echo "Processing post-install commands..."
68 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
69 }
71 post_remove()
72 {
73 echo "Processing post-remove commands..."
74 depmod -a
75 }