summaryrefslogtreecommitdiff
path: root/extra/fakechroot/PKGBUILD
blob: f6bb0d3948bee22bcd7ca87e42de4878170a2522 (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
# $Id: PKGBUILD 182910 2013-04-16 04:51:02Z allan $
# Maintainer : Allan McRae <allan@archlinux.org>
# Contributor: Aaron Griffin <aaron@archlinux.org>

pkgname=fakechroot
pkgver=2.16
pkgrel=2
pkgdesc="Gives a fake chroot environment"
arch=('i686' 'x86_64' 'mips64el')
url="https://github.com/fakechroot/fakechroot/wiki"
license=('LGPL')
options=('!libtool')
install=fakechroot.install
source=(https://github.com/downloads/fakechroot/fakechroot/fakechroot-${pkgver}.tar.gz)
md5sums=('3ea5efb76664e787450e0cfcefc1b807')


prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}
  
  # https://github.com/fakechroot/fakechroot/issues/10
  sed -i "s#usr/sbin/chroot#usr/bin/chroot#" test/testtree.sh test/t/chroot.t
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  # Somehow not all files use the chroot found by configure.
  find test -type f | xargs sed -i 's,/usr/sbin/chroot,/usr/bin/chroot,'
  ./configure --prefix=/usr --libdir=/usr/lib/libfakeroot --sysconfdir=/etc
  make
}

check() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make check
}
  
package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
  
  install -dm755 ${pkgdir}/etc/ld.so.conf.d/
  echo '/usr/lib/libfakeroot/fakechroot/' > ${pkgdir}/etc/ld.so.conf.d/fakechroot.conf
}