aboutsummaryrefslogtreecommitdiffstats
path: root/main/json-c/APKBUILD
blob: 84bca1af4a3753ab4fb1146a1d9420972af0408f (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
54
55
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=json-c
pkgver=0.12
pkgrel=1
pkgdesc="A JSON implementation in C"
url="https://github.com/json-c/json-c/wiki"
arch="all"
license="MIT"
depends=""
depends_dev=""
makedepends="$depends_dev autoconf automake libtool"
install=""
subpackages="$pkgname-dev"
source="https://s3.amazonaws.com/${pkgname}_releases/releases/$pkgname-${pkgver}.tar.gz
	size-set-but-not-used.patch
	"

_builddir="$srcdir"/json-c-$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
	libtoolize --force && aclocal && autoconf && autoheader \
		&& automake --add-missing
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-static \
		--enable-shared \
		 || return 1
	make -j1 || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/lib/*.la
}

md5sums="3ca4bbb881dfc4017e8021b5e0a8c491  json-c-0.12.tar.gz
ff9d703a13744d4a67c074dfa25d3eea  size-set-but-not-used.patch"
sha256sums="000c01b2b3f82dcb4261751eb71f1b084404fb7d6a282f06074d3c17078b9f3f  json-c-0.12.tar.gz
71cd883f54d46f023eaf2e530344c301dbbe9bd5090d64a1abe4dd8394afb2b4  size-set-but-not-used.patch"
sha512sums="c959804362386f6b77e9d04b5fedf6d6aff1fcd0ab50250edb25f759b510b402e7ad4b33d1cbadc3337b63a3145d19f310812a9ee351748348304b384dc2dc35  json-c-0.12.tar.gz
881faff046ae3608c82456276788b4a72e0abd75f8c2d57e192a8a40c887cd78e535f3a009ca69180c29dfcf07f3d823b4cd84b944103a4c7d5b1a7a5eb98103  size-set-but-not-used.patch"