aboutsummaryrefslogtreecommitdiffstats
path: root/main/libbsd/APKBUILD
blob: 2600ebdfb0def7b6ef7e64fd6a65097864ceaea7 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=libbsd
pkgver=0.8.6
pkgrel=1
pkgdesc="commonly-used BSD functions not implemented by all libcs"
url="https://libbsd.freedesktop.org/"
arch="all"
license="BSD"
depends="musl>=1.1.16-r22"
depends_dev="bsd-compat-headers linux-headers"
makedepends="$depends_dev autoconf automake libtool"
subpackages="$pkgname-dev $pkgname-doc"
source="https://libbsd.freedesktop.org/releases/$pkgname-$pkgver.tar.xz
	0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
	"

builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	default_prepare || return 1

	cd "$builddir"
	autoreconf -fi || return 1
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

package() {
	make DESTDIR="$pkgdir" -C "$builddir" \
		install || return 1
}

sha512sums="ece01ced324f840c2cee6321c7dcf97ff123d55ea9f203c1ce35e1b46643dc7b34ef6dc6c8d128252b36848624850b40823411cc96b99a66a401eb1e9d8cea6b  libbsd-0.8.6.tar.xz
4ef5d664f04af21da17c5ac9eed6fec4c0c7d06ff3af70e93bfdfdf926c7473954649e315158ec8f90cef93f82524431fa4fbc60374d20007f1234d6afe9edcd  0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch"