aboutsummaryrefslogtreecommitdiffstats
path: root/main/skalibs/APKBUILD
blob: e37e4e179b97d79f321508e877a5e871533d0526 (plain) (blame)
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
# Maintainer: Laurent Bercot <ska-devel@skarnet.org>
# Contributor: John Regan <john@jrjrtech.com>
pkgname=skalibs
pkgver=2.10.0.2
pkgrel=1
pkgdesc="Set of general-purpose C programming libraries for skarnet.org software."
url="https://skarnet.org/software/skalibs/"
arch="all"
license="ISC"
options="!check"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://skarnet.org/software/skalibs/skalibs-$pkgver.tar.gz skalibs.pc"

prepare() {
	default_prepare
	sed -i "s|@@VERSION@@|$pkgver|" -i "$srcdir"/*.pc
}

build() {
	./configure \
		--enable-shared \
		--enable-static \
		--libdir=/usr/lib
	make
}

package() {
	make DESTDIR="$pkgdir" install
	install -D -m 0644 "$srcdir/skalibs.pc" "$pkgdir/usr/lib/pkgconfig/skalibs.pc"
	mkdir -p "$pkgdir/usr/share/doc"
	cp -a "$builddir/doc" "$pkgdir/usr/share/doc/$pkgname"
}

dev() {
	default_dev
	mkdir -p "$subpkgdir"/usr/lib/"$pkgname"/sysdeps
	mv "$pkgdir/usr/lib/$pkgname"/sysdeps/* \
		"$subpkgdir/usr/lib/$pkgname"/sysdeps
	rm -rf "$pkgdir/usr/lib"
}

sha512sums="b36b7fefb9df63093f1bd775fe9d2bf7ed588404a99a55b1ecabfc0e3b6eac49989dfb736f7f69a9508e4dfeeb669d48e639964aef5c65c330043c543cd38801  skalibs-2.10.0.2.tar.gz
5771f0e72e7e7e9a45cafdf2e4508938a29ff9474845c897e383004b031ad142dee1b65d83a9a0168696782163cb4a32f82db4d7360413b433e68282cd4cc487  skalibs.pc"