# $Id: PKGBUILD 296360 2018-02-19 09:51:44Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Andreas Wagner <Andreas dot Wagner at em dot uni-frankfurt dot de>

pkgname=liblockfile
pkgver=1.14_1.1
_basever=1.14
pkgrel=1
pkgdesc="a library with NFS-safe locking functions"
arch=('x86_64')
license=('GPL')
url="http://packages.debian.org/unstable/libs/liblockfile1"
depends=('glibc')
makedepends=()
source=(http://ftp.debian.org/debian/pool/main/libl/$pkgname/${pkgname}_${_basever}.orig.tar.gz
	http://ftp.debian.org/debian/pool/main/libl/$pkgname/${pkgname}_${pkgver/_/-}.debian.tar.bz2)
sha256sums=('ab40d4a3e8cbc204f7e87fea637a4e4ddf9a1149aaa0a723a4267febd0b1d060'
            '3514c293b3d48d1cbffb8ba3bef14337ec0483182c2aef3653566243a2717dd6')

build() {
  cd "$srcdir"/$pkgname
  for p in `cat ../debian/patches/series` ; do
    patch -p1 < ../debian/patches/$p
  done
  LDCONFIG=/usr/bin/true ./configure --enable-shared --prefix=/usr --mandir=/usr/share/man
  make
}

package() {
  cd "$srcdir"/$pkgname
  mkdir -p "$pkgdir"/usr/{lib,bin,include,share/man/man1,share/man/man3}
  make install prefix="$pkgdir"/usr mandir="$pkgdir"/usr/share/man
}
