# Maintainer: Phillip Smith <fukawi2@NO-SPAM.gmail.com>
# Maintainer: gregor <gregor@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=dump
pkgver=0.4b42
pkgrel=1
pkgdesc="Standard *nix for performing backups to tapedrive from ext2 and ext3 filesystems"
arch=(i686 x86_64)
url="http://dump.sourceforge.net/"
license=('custom')
depends=('e2fsprogs')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
        'build-without-selinux.patch::http://sourceforge.net/tracker/download.php?group_id=1306&atid=101306&file_id=342031&aid=2847460')
md5sums=('7202465ed687da2540a7b2b44a09f1b9'
         '9b4701e9aedf094deca277846d0464a3')

build() {
  cd $srcdir/$pkgname-$pkgver
  
  msg "It's okay to ignore the error about CHANGES not being patched. The important files are patched correctly"
  patch < $srcdir/build-without-selinux.patch
  
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --with-manowner=root \
    --with-mangrp=root \
    --with-manmode=644 \
    --with-bingrp=root \
    --disable-readline \
    --disable-transselinux || return 1
  
  make || return 1
}

package() {
  cd $srcdir/$pkgname-$pkgver
  
  make prefix=$pkgdir/usr install || return 1
  
  # install license
  install -Dm644 COPYRIGHT $pkgdir/usr/share/licenses/dump/COPYRIGHT || return 1
}

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