1 # Contributor: Paul Mattal <pjmattal@elys.com>
2 # Maintainer: Calimero <calimeroteknik@free.fr>
8 # Set to whatever the tree of your aufs-friendly kernel is, and set the right dependency.
9 #_kernver=${pkgver%_*}-ARCH
10 #depends=('aufs_friendly')
12 _kernver=3.1-aufs_friendly
13 depends=('linux-aufs_friendly')
15 pkgdesc="Another UnionFS implementation"
16 arch=('i686' 'x86_64')
17 url="http://aufs.sourceforge.net/"
19 replaces=('aufs' 'aufs2')
22 source=("http://calimeroteknik.free.fr/src/aufs3-${pkgver}.tar.gz")
23 options=('!makeflags' '!strip')
24 md5sums=('f57403bac2ec56a7a08e8be4407c6cd2')
27 cd "${srcdir}/aufs3-${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-$(</lib/modules/extramodules-${_kernver}/version)"
56 cd "${srcdir}/aufs3-${pkgver}"
57 install -D -m644 fs/aufs/aufs.ko \
58 "${pkgdir}/lib/modules/extramodules-${_kernver}/aufs.ko"
59 #"${pkgdir}/lib/modules/${_kernver}/kernel/fs/aufs/aufs.ko"
60 # tweak the install script for the right kernel version
61 sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
62 "${startdir}/aufs3.install"
63 # install include file
64 install -D -m 644 include/linux/aufs_type.h "${pkgdir}/usr/include/linux/aufs_type.h"
66 find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;