summaryrefslogtreecommitdiffstats
path: root/main/libbsd/APKBUILD
blob: 1499eb93d4d08f6c0988f685a0ba67303369fcaa (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=libbsd
pkgver=0.4.2
pkgrel=0
pkgdesc="commonly-used BSD functions not implemented by all libcs"
url="http://libbsd.freedesktop.org/"
arch="all"
license="BSD"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="http://libbsd.freedesktop.org/releases/libbsd-$pkgver.tar.gz"

_builddir="$srcdir"/libbsd-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

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() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/lib/*.la
}

md5sums="591fc9de4ca22f78cf87a94e648a92f4  libbsd-0.4.2.tar.gz"
sha256sums="922b4885e0ccfd64b92fcacdb3fba18024fcab1e0c1b073f5ec0fe76388cbfdc  libbsd-0.4.2.tar.gz"
sha512sums="973d07b39040d9a0f3ee6b347c23a7a2dee0ec9490532909e8e815679d4bbe6d2f8caedc6f84162cf684bef3819a5ad5883f41e64675c9fb7d8be4db0aa1e619  libbsd-0.4.2.tar.gz"