# $Id: PKGBUILD 114544 2014-07-01 21:11:37Z seblu $
# Maintainer: Sébastien Luttringer <seblu@archlinux.org>
# Contributor: eric <eric@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Contributor: Chris Brannon <cmbrannon79@gmail.com>

pkgname=stow
pkgver=2.2.0
pkgrel=3
pkgdesc='Manage installation of multiple softwares in the same directory tree'
url='http://www.gnu.org/software/stow/'
arch=('any')
license=('GPL2')
depends=('perl')
makedepends=('texi2html')
checkdepends=('perl-test-output')
install=$pkgname.install
source=("ftp://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.gz"
        '01-fix-warning-message-perl5.20.patch')
md5sums=('902564d502975f353d3b0514a21863b1'
         'eef5f349057aea7dcbf6567a63f26096')

prepare() {
  patch -d $pkgname-$pkgver -p 1 < '01-fix-warning-message-perl5.20.patch'
}

build() {
  cd $pkgname-$pkgver
  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man \
    --infodir=/usr/share/info \
    --with-pmdir=/usr/lib/perl5/vendor_perl/
  make
}

check() {
  cd $pkgname-$pkgver
  make check
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  # remove html doc
  rm -r "$pkgdir/usr/share/doc/$pkgname"/{manual*,version.texi}
}

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