# $Id$
# Maintainer : Allan McRae <allan@archlinux.org>
# Contributor: Aaron Griffin <aaron@archlinux.org>

pkgname=fakechroot
pkgver=2.17.2
pkgrel=1
pkgdesc="Gives a fake chroot environment"
arch=('i686' 'x86_64')
url="https://github.com/dex4er/fakechroot/wiki"
license=('LGPL')
install=fakechroot.install
source=(https://github.com/dex4er/fakechroot/archive/${pkgver}.tar.gz)
md5sums=('e614f62972efa4654fc780ae7e4affad')


build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  ./configure --prefix=/usr --sbindir=/usr/bin \
    --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
}