aboutsummaryrefslogtreecommitdiffstats
path: root/main/iniparser/APKBUILD
blob: cb266f2b871075ab32bb6859eca32c2c77ff6647 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=iniparser
pkgver=4.0
pkgrel=1
pkgdesc="C library for parsing "INI-style" files"
url="http://ndevilla.free.fr/iniparser/"
arch="all"
license="MIT"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/ndevilla/iniparser/archive/v$pkgver.tar.gz
	rpath.patch"

_builddir="$srcdir"/iniparser-$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"
	make CC="${CC:-gcc}" CFLAGS="${CFLAGS} -fPIC" LDFLAGS="$LDFLAGS" \
		libiniparser.so || return 11
}

package() {
	cd "$_builddir"
	install -d "$pkgdir"/usr/lib "$pkgdir"/usr/include || return 1
	install -m 644 src/dictionary.h "$pkgdir"/usr/include/dictionary.h \
		|| return 1
	install -m 644 src/iniparser.h "$pkgdir"/usr/include/iniparser.h \
		|| return 1
	install -m 755 libiniparser.so.0 "$pkgdir"/usr/lib/libiniparser.so.0 \
		|| return 1
	ln -s libiniparser.so.0 "$pkgdir"/usr/lib/libiniparser.so \
		|| return 1
}

md5sums="94c7278f8d22de1a31320219b27634b0  iniparser-4.0.tar.gz
41616be03aa5bfc59c9420792aa91a92  rpath.patch"
sha256sums="e0bbd664bb3f0d64c21ac2d67a843b1c7a3a9710e96393344d170ab8b33e92ba  iniparser-4.0.tar.gz
8f8c3888bff71dc05b6937f432c298db2be75938b5ccea2388f00343e0820f53  rpath.patch"
sha512sums="86080d4e4cb85e252f9c75116d9a548a2f08f2131e269834a0d16597da4e4c5790dff8304be082f2a8dcc75d17585e9a8fad3f0f4766bff8914f6ef2b0d6fa05  iniparser-4.0.tar.gz
bf517a9d311b887eb59cd2e296601cbd1e217965cd67cdcf90dc0604bef40365978f062c8252abb21a7eb6b8ae11c0a175317fee33af01c332f5390ae0115bd5  rpath.patch"