# Maintainer: Jesus E. pkgname=bmake pkgver=20200710 _debver=$pkgver _debrel=14 pkgrel=1 pkgdesc="Portable version of the NetBSD make build tool" arch=('i686' 'x86_64') url='http://www.crufty.net/help/sjg/bmake.html' license=('Modified-BSD' 'Original-BSD') depends=('python') makedepends=('quilt') source=("https://deb.debian.org/debian/pool/main/b/bmake/bmake_${pkgver}.orig.tar.gz" "https://deb.debian.org/debian/pool/main/b/bmake/bmake_${_debver}-${_debrel}.debian.tar.xz") sha512sums=('1e7138c8c90f20af0cb493ae15af9b5199d5890ec8278909744cbfbf0fee0780c0483170561f879bae2c09286280bf9df049428d5524581ea633a0f806f31e4b' '7ee1064d6570069cae5a2b5a88c1458654caa6397a5b1ece8ef8246e9e929ed0754d167db1a49ff9248d29eec13e0371136613a663bb14eb27c2a17325586e83') prepare() { cd $pkgname if [[ ${pkgver%.*} = ${_debver%.*} ]]; then # Debian patches export QUILT_PATCHES=debian/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' export QUILT_DIFF_ARGS='--no-timestamps' mv "$srcdir"/debian . # Doesn't apply rm -v debian/patches/140_multiarch.diff || true quilt push -av fi } build() { cd $pkgname ./boot-strap --prefix=/usr op=build } # op=build also runs unit tests; thus no check() package() { cd $pkgname # Fix directory permissions on install install -d "$pkgdir/usr/bin" "$pkgdir/usr/share/licenses/$pkgname" ./boot-strap --install-destdir="$pkgdir" --prefix=/usr op=install rm -rf "$pkgdir/usr/share/man/cat1" rm -rf "$pkgdir/usr/share/mk/java.mk" install -Dm 644 bmake.1 "$pkgdir/usr/share/man/man1/bmake.1" head -n70 main.c >"$pkgdir"/usr/share/licenses/$pkgname/LICENSE }