diff options
author | CTK | 2015-07-28 23:12:41 +0200 |
---|---|---|
committer | CTK | 2015-07-28 23:13:13 +0200 |
commit | 7b12edc0ddd22b324571cb9341fca28103ddda04 (patch) | |
tree | c5f7b5c9a1de7d7fd7bcc8d9bae70f63cb694835 | |
download | aur-7b12edc0ddd22b324571cb9341fca28103ddda04.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 88 | ||||
-rw-r--r-- | aufs.install | 13 |
3 files changed, 124 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..bae23c67c22c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = aufs + pkgdesc = Another UnionFS implementation + pkgver = 4.0_20150427 + pkgrel = 1 + url = http://aufs.sourceforge.net/ + install = aufs.install + arch = i686 + arch = x86_64 + license = GPL2 + makedepends = git + makedepends = linux-aufs_friendly-headers + depends = linux-aufs_friendly + conflicts = aufs2 + conflicts = aufs3 + replaces = aufs2 + replaces = aufs3 + options = !makeflags + options = !strip + source = aufs::git+https://github.com/sfjro/aufs4-standalone + md5sums = SKIP + +pkgname = aufs + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..83085bd24486 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,88 @@ +# Contributor: Paul Mattal <pjmattal@elys.com> +# Maintainer: Calimero <calimeroteknik@free.fr> + +# Uncomment one of the following blocks to match your aufs-friendly kernel. + +# for an AUFS-patched core kernel: +#_kerntree="-ARCH" +#depends=('aufs_friendly') +#makedepends=('git' 'linux-headers') + +# for the kernel branded aufs_friendly: +_kerntree="-aufs_friendly" +depends=('linux-aufs_friendly') +makedepends=('git' 'linux-aufs_friendly-headers') + + +# Detect the installed kernel version to build for +_kernel="$(cd /usr/lib/modules;p=$(echo extramodules-*"${_kerntree}"/version);p=${p#extramodules-};echo "${p%${_kerntree}/version}")" +_kernver="${_kernel}${_kerntree}" + +pkgname=aufs +pkgver=4.0_20150427 +pkgrel=1 +pkgdesc="Another UnionFS implementation" +arch=('i686' 'x86_64') +url="http://aufs.sourceforge.net/" +license=('GPL2') +replaces=('aufs2' 'aufs3') +conflicts=('aufs2' 'aufs3') +install='aufs.install' +options=('!makeflags' '!strip') +source=("${pkgname}::git+https://github.com/sfjro/aufs4-standalone") +md5sums=('SKIP') + +pkgver() { + cd "${pkgname}" + # Checkout the most recent branch for the AUFS-friendly kernel version installed + git checkout -q "$(git for-each-ref --format='%(refname:short)' --sort=-refname:short "*/*/*/aufs${_kernel}*" --count=1)" + echo "${_kernel}_$(sed -n '/AUFS_VERSION/s/^.*-\([0-9]*\)"$/\1/p' include/uapi/linux/aufs_type.h)" +} + +build() { + cd "${srcdir}/${pkgname}" + + sed -i 's|CONFIG_AUFS_HNOTIFY =.*|CONFIG_AUFS_HNOTIFY = y|' \ + config.mk + sed -i 's|CONFIG_AUFS_HFSNOTIFY =.*|CONFIG_AUFS_HFSNOTIFY = y|' \ + config.mk + sed -i 's|CONFIG_AUFS_EXPORT =.*|CONFIG_AUFS_EXPORT = y|' \ + config.mk + sed -i 's|CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \ + config.mk + sed -i 's|CONFIG_AUFS_BDEV_LOOP =.*|CONFIG_AUFS_BDEV_LOOP = y|' \ + config.mk + sed -i 's|CONFIG_AUFS_BR_RAMFS =.*|CONFIG_AUFS_BR_RAMFS = y|' \ + config.mk + sed -i 's|CONFIG_AUFS_DEBUG =.*|CONFIG_AUFS_DEBUG =|' \ + config.mk + 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/uapi/linux/aufs_type.h + ln -s "/usr/lib/modules/$(</usr/lib/modules/extramodules-${_kernver}/version)/build/include/linux/mount.h" fs/mount.h + make KDIR="/usr/lib/modules/$(</usr/lib/modules/extramodules-${_kernver}/version)/build" +} + +package() { + cd "${srcdir}/${pkgname}" + + install -D -m644 fs/aufs/aufs.ko \ + "${pkgdir}/usr/lib/modules/extramodules-${_kernver}/aufs.ko" + #"${pkgdir}/usr/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}/aufs.install" + + # install include file + install -D -m 644 include/uapi/linux/aufs_type.h "${pkgdir}/usr/include/linux/aufs_type.h" + + # gzip -9 the module + find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \; +} diff --git a/aufs.install b/aufs.install new file mode 100644 index 000000000000..3252ab83fb4c --- /dev/null +++ b/aufs.install @@ -0,0 +1,13 @@ +post_install() { + KERNEL_VERSION=4.0-aufs_friendly + depmod $(cat /usr/lib/modules/extramodules-$KERNEL_VERSION/version) + echo 'Note: you may need to manually load the loop module before the aufs module.' +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} |