PKGBUILDs/extra/aufs2/PKGBUILD

66 lines
2.2 KiB
Bash
Raw Normal View History

2011-02-06 16:48:25 +00:00
# $Id: PKGBUILD 107419 2011-01-24 19:05:04Z tpowa $
# Maintainer: Paul Mattal <pjmattal@elys.com>
# PlugApps: Kevin Mihelich <kevin@plugapps.com>
# - _kernver=2.6.37, without -ARCH
2011-02-06 16:51:53 +00:00
plugrel=1
2011-02-06 16:48:25 +00:00
pkgname=aufs2
pkgver=2.6.37_20110124
pkgrel=1
#_kernver=${pkgver%_*}-ARCH
_kernver=2.6.37
pkgdesc="Another Unionfs Implementation"
arch=('i686' 'x86_64')
url="http://aufs.sourceforge.net/"
license=('GPL2')
depends=('kernel26>=2.6.37' 'kernel26<2.6.38')
makedepends=('kernel26-headers>=2.6.37' 'kernel26-headers<2.6.38')
replaces=('aufs')
install=${pkgname}.install
source=("ftp://ftp.archlinux.org/other/aufs2/${pkgname}-${pkgver}.tar.gz")
options=('!makeflags')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
#patch -Np1 -i ../aufs2-module-2.6.36.patch
sed -i 's|CONFIG_AUFS_HNOTIFY =.*|CONFIG_AUFS_HNOTIFY = y|' \
config.mk || return 1
sed -i 's|CONFIG_AUFS_HFSNOTIFY =.*|CONFIG_AUFS_HFSNOTIFY = y|' \
config.mk || return 1
sed -i 's|CONFIG_AUFS_EXPORT =.*|CONFIG_AUFS_EXPORT = y|' \
config.mk || return 1
sed -i 's|CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \
config.mk || return 1
sed -i 's|CONFIG_AUFS_BDEV_LOOP =.*|CONFIG_AUFS_BDEV_LOOP = y|' \
config.mk || return 1
sed -i 's|CONFIG_AUFS_BR_RAMFS =.*|CONFIG_AUFS_BR_RAMFS = y|' \
config.mk || return 1
sed -i 's|CONFIG_AUFS_DEBUG =.*|CONFIG_AUFS_DEBUG =|' \
config.mk || return 1
if [ "${CARCH}" = "x86_64" ]; then
inot64=" y"
else
inot64=""
fi
sed -i "s|CONFIG_AUFS_INO_T_64 =.*|CONFIG_AUFS_INO_T_64 =${inot64}|" \
config.mk
# build, sed fixes are from gentoo portage build
sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile
sed -i "s:__user::g" include/linux/aufs_type.h
make KDIR=/usr/src/linux-${_kernver}
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
install -D -m644 fs/aufs/aufs.ko \
$pkgdir/lib/modules/${_kernver}/kernel/fs/aufs/aufs.ko
# tweak the install script for the right kernel version
sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
$startdir/$pkgname.install
# install include files
install -D -m 644 include/linux/aufs_type.h $pkgdir/usr/include/linux/aufs_type.h
}
md5sums=('fa64d7893490ef9c82310ebd5f730443')