1 # Contributor: Paul Mattal <pjmattal@elys.com>
2 # Maintainer: Calimero <calimeroteknik@free.fr>
7 #_kernver=${pkgver%_*}-ARCH
9 # Set to whatever the tree of your aufs-friendly kernel is, and set the right dependency.
11 #depends=('aufs_friendly')
13 _kernver=3.0-aufs_friendly
14 depends=('linux-aufs_friendly')
16 pkgdesc="Another Unionfs Implementation"
17 arch=('i686' 'x86_64')
18 url="http://aufs.sourceforge.net/"
22 source=("http://calimeroteknik.free.fr/src/aufs2-${pkgver}.tar.gz")
23 options=('!makeflags' '!strip')
24 md5sums=('c270ef00d60f9b8ff92dfc4be0d2e143')
27 cd ${srcdir}/aufs2-${pkgver}
28 sed -i 's|CONFIG_AUFS_HNOTIFY =.*|CONFIG_AUFS_HNOTIFY = y|' \
30 sed -i 's|CONFIG_AUFS_HFSNOTIFY =.*|CONFIG_AUFS_HFSNOTIFY = y|' \
32 sed -i 's|CONFIG_AUFS_EXPORT =.*|CONFIG_AUFS_EXPORT = y|' \
34 sed -i 's|CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \
36 sed -i 's|CONFIG_AUFS_BDEV_LOOP =.*|CONFIG_AUFS_BDEV_LOOP = y|' \
38 sed -i 's|CONFIG_AUFS_BR_RAMFS =.*|CONFIG_AUFS_BR_RAMFS = y|' \
40 sed -i 's|CONFIG_AUFS_DEBUG =.*|CONFIG_AUFS_DEBUG =|' \
42 if [ "${CARCH}" = "x86_64" ]; then
47 sed -i "s|CONFIG_AUFS_INO_T_64 =.*|CONFIG_AUFS_INO_T_64 =${inot64}|" \
49 # build, sed fixes are from gentoo portage build
50 sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile
51 sed -i "s:__user::g" include/linux/aufs_type.h
52 make KDIR=/usr/src/linux-${_kernver}
56 cd ${srcdir}/aufs2-${pkgver}
57 install -D -m644 fs/aufs/aufs.ko \
58 $pkgdir/lib/modules/${_kernver}/kernel/fs/aufs/aufs.ko
59 # tweak the install script for the right kernel version
60 sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
61 $startdir/aufs2.install
62 # install include files
63 install -D -m 644 include/linux/aufs_type.h $pkgdir/usr/include/linux/aufs_type.h
64 # gzip -9 all modules to safe 100MB
65 find "$pkgdir" -name '*.ko' -exec gzip -9 {} \;