1 # Maintainer: Dave Reisner <d@falconindy.com>
7 pkgdesc="Another Unionfs Implementation. Builds modules for all detected kernels"
9 url="http://aufs.sourceforge.net/"
15 source=(ftp://ftp.archlinux.org/other/aufs2/${_pkgbase}-${pkgver}.tar.gz)
16 options=('!makeflags')
17 md5sums=('60649fa47d3f499dfbb4b68a2afde47c')
20 cd ${srcdir}/${_pkgbase}-${pkgver}
21 sed -i -e 's|CONFIG_AUFS_HNOTIFY =.*|CONFIG_AUFS_HNOTIFY = y|' \
22 -e 's|CONFIG_AUFS_HFSNOTIFY =.*|CONFIG_AUFS_HFSNOTIFY = y|' \
23 -e 's|CONFIG_AUFS_EXPORT =.*|CONFIG_AUFS_EXPORT = y|' \
24 -e 's|CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \
25 -e 's|CONFIG_AUFS_BDEV_LOOP =.*|CONFIG_AUFS_BDEV_LOOP = y|' \
26 -e 's|CONFIG_AUFS_BR_RAMFS =.*|CONFIG_AUFS_BR_RAMFS = y|' \
27 -e 's|CONFIG_AUFS_DEBUG =.*|CONFIG_AUFS_DEBUG =|' config.mk
29 [[ "${CARCH}" = "x86_64" ]] && inot64="y" || inot64=""
31 sed -i "s|CONFIG_AUFS_INO_T_64 =.*|CONFIG_AUFS_INO_T_64 =${inot64}|" config.mk
33 for _kernver in $(file /boot/* | sed -n '/Linux kernel/s/.* version \(2\.6\.[-[:alnum:]_]\+\).*/\1/p'); do
34 msg2 "Building module for $_kernver..."
36 # KDIR is necessary even when cleaning
37 make clean KDIR=/usr/src/linux-${_kernver}
38 make aufs.ko KDIR=/usr/src/linux-${_kernver}
40 install -D -m644 fs/aufs/aufs.ko $pkgdir/lib/modules/${_kernver}/kernel/fs/aufs/aufs.ko
42 # install include files if not included with kernel
43 [[ -f /usr/src/linux-$_kernver/include/linux/aufs_type.h ]] ||
44 install -D -m 644 include/linux/aufs_type.h $pkgdir/usr/src/linux-$_kernver/include/linux/aufs_type.h