# Maintainer: judd <jvinet@zeroflux.org>

pkgname=findutils
pkgver=4.4.2
pkgrel=2
pkgdesc="GNU utilities to locate files"
arch=('i686' 'x86_64')
license=('GPL3')
groups=('base')
depends=('glibc>=2.8')
url="http://www.gnu.org/software/findutils"
source=("ftp://ftp.gnu.org/pub/gnu/findutils/findutils-$pkgver.tar.gz")
install="$pkgname.install"
md5sums=('351cc4adb07d54877fa15f75fb77d39f')

build() {
  cd $srcdir/$pkgname-$pkgver
  
  ./configure --prefix=/usr
  
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver
  
  # believe it or not, the Makefile really wants to remove /usr/var, so we let it...
  mkdir -p $pkgdir/usr/var
  
  make DESTDIR=$pkgdir install
  
  rm -rf $pkgdir/usr/libexec
  
  # remove locate utils (we use slocate instead)
  rm -f $pkgdir/usr/bin/{locate,updatedb}
  rm -f $pkgdir/usr/share/man/man1/{updatedb.1,locate.1}
  rm -f $pkgdir/usr/share/man/man5/locatedb.5
  rmdir $pkgdir/usr/var
  rm -f $pkgdir/usr/share/info/dir
}

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