summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/aufs/PKGBUILD
blob: 37ae95f39a0af29dcdce57370a7bc5ea21bf222c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# $Id: PKGBUILD 15519 2008-10-14 07:05:41Z thomas $
# Contributor: Paul Mattal <paul@mattal.com>
# Maintainer: Paul Mattal <pjmattal@elys.com>
pkgname=aufs
pkgver=20081012
pkgrel=2
_kernver='2.6.27-ARCH'
pkgdesc="Another Unionfs Implementation that supports NFS branches"
arch=('i686' 'x86_64')
url="http://aufs.sourceforge.net/"
license=('GPL2')
depends=('kernel26>=2.6.27' 'kernel26<2.6.28' 'glibc' 'aufs-utils=20081012')
install=$pkgname.install
source=(ftp://ftp.archlinux.org/other/aufs/$pkgname-$pkgver.tar.gz)
options=(!libtool !makeflags)
md5sums=('fb5eaa69b2c7e6e521cb9a9cae9ac23f')

build() {
  cd $startdir/src/$pkgname || return 1

  # Fix TMPFS_MAGIC error
  sed 's|-le 26|-le 27|g' -i fs/aufs25/Makefile || return 1

  # use splice functions exported by unionfs kernel patch'
  # - important for loopback fs mounts 
  sed -i 's|CONFIG_AUFS_SPLICE_PATCH =|CONFIG_AUFS_SPLICE_PATCH = y|' \
     local.mk || return 1

  # this fixes the unionfs patch from hanging aufs
  sed -i 's|CONFIG_AUFS_UNIONFS23_PATCH =|CONFIG_AUFS_UNIONFS23_PATCH = y|' \
     local.mk || return 1

  sed -i 's|CONFIG_AUFS_WORKAROUND_FUSE =|CONFIG_AUFS_WORKAROUND_FUSE = y|' \
     local.mk || return 1

  sed -i 's|CONFIG_AUFS_BRANCH_MAX_127 = y|CONFIG_AUFS_BRANCH_MAX_127 =|' \
     local.mk || return 1
          	        	       	       	   
  sed -i 's|CONFIG_AUFS_BRANCH_MAX_1023 =|CONFIG_AUFS_BRANCH_MAX_1023 = y|' \
     local.mk || return 1

  # ???
  sed -i 's|.*CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \
    local.mk || return 1

  # configure for NFS by:
  # 1) configure local.mk to use FILP and LHASH
  sed -i 's|CONFIG_AUFS_PUT_FILP_PATCH =|CONFIG_AUFS_PUT_FILP_PATCH = y|' \
    local.mk || return 1
  sed -i 's|CONFIG_AUFS_LHASH_PATCH =|CONFIG_AUFS_LHASH_PATCH = y|' \
    local.mk || return 1
  # 2) configure local.mk NOT to use FAKE_DM
  sed -i 's|CONFIG_AUFS_FAKE_DM = y|CONFIG_AUFS_FAKE_DM =  |' \
    local.mk || return 1

  # build
  make KDIR=/usr/src/linux-$_kernver/ -f local.mk || return 1

  # install
  install -D -m644 fs/aufs25/aufs.ko \
    $startdir/pkg/lib/modules/$_kernver/fs/aufs25/aufs.ko || return 1

  # tweak the install script for the right kernel version
  sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
    $startdir/$pkgname.install || return 1
}

# vim:set ts=2 sw=2 et: