aboutsummaryrefslogtreecommitdiffstats
path: root/community/bmake/APKBUILD
blob: d414e419527236d804e471c22f51045f662928c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=bmake
pkgver=20220418
pkgrel=0
pkgdesc="Portable version of the NetBSD make build tool"
url="http://www.crufty.net/help/sjg/bmake.html"
arch="all"
license="BSD-2-Clause"
subpackages="$pkgname-doc"
checkdepends="tzdata"
source="http://www.crufty.net/ftp/pub/sjg/bmake-$pkgver.tar.gz
	install-sh.patch
	separate-tests.patch"
builddir="$srcdir/$pkgname"

# Reset MAKEFLAGS since it might contain options not supported
# by bmake. This is, for instance, the case on the builders.
export MAKEFLAGS="-j${JOBS:-1}"

prepare() {
	default_prepare

	# FIXME: Disable tests failing on musl.
	sed -i unit-tests/Makefile \
		-e "/deptgt-delete_on_error/d"
}

build() {
	sh ./boot-strap --with-default-sys-path=/usr/share/mk op=build
}

check() {
	sh ./boot-strap op=test
}

package() {
	sh ./boot-strap --prefix=/usr --with-mksrc=/usr/share/mk \
			--install-destdir="$pkgdir" op=install

	rm -rf "$pkgdir"/usr/share/man/cat1
	install -Dm644 bmake.1 \
		"$pkgdir"/usr/share/man/man1/bmake.1

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
	install -m644 README ChangeLog \
		"$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="
89fa5cb6e35ee1cd6a32acf291bda33b3a7272c4ef25d38412b8caa7e092210c8fa04a11d19d3c19b7e60dee2cf0a5049cf393be6e25b6e28bab2eea50e03204  bmake-20220418.tar.gz
0de9022a2991c5ef02c09ab592a3e2d218cd0bbf58e54f21bc7694110f3dd9e4589bf2b3d241fd167fb220b425007863f20e71e141b4f65bf92d305ba94209da  install-sh.patch
04217b04aca4252f54c836e982d95106a09166370f84fa672c418d1b1799adb9697f5ac9eb10a6ee3a8527e39196a37ad92bb5945733407bf9ec1a7f223183bb  separate-tests.patch
"