summaryrefslogtreecommitdiffstats
path: root/abs/core/aufs2/PKGBUILD
blob: 18c229381a5d3e803c87bc18b2c0bb57ed025c7f (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
# $Id: PKGBUILD 97484 2010-10-30 17:27:24Z tpowa $
# Maintainer: Paul Mattal <pjmattal@elys.com>

pkgname=aufs2
pkgver=2.6.36_20101021
pkgrel=2
#_kernver=${pkgver%_*}-ARCH
_kernver=2.6.36-LinHES
pkgdesc="Another Unionfs Implementation"
arch=('i686' 'x86_64')
url="http://aufs.sourceforge.net/"
license=('GPL2')
depends=('kernel26>=2.6.36' 'kernel26<2.6.37')
makedepends=('kernel26-headers>=2.6.36' 'kernel26-headers<2.6.37')
replaces=('aufs')
install=${pkgname}.install
source=("ftp://ftp.archlinux.org/other/aufs2/${pkgname}-${pkgver}.tar.gz"
       aufs2-module-2.6.36.patch)
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 || return 1
  # build
  make KDIR=/usr/src/linux-${_kernver} || return 1
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  install -D -m644 fs/aufs/aufs.ko \
    $pkgdir/lib/modules/${_kernver}/kernel/fs/aufs/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
  # install include files
  install -D -m 644 include/linux/aufs_type.h $pkgdir/usr/src/linux-$_kernver/include/linux/aufs_type.h || return 1
}
md5sums=('9ba0666dc200bebb240ac598f9021d9f'
         '55aac34dd0aa39458b6d927f4b2bddb8')