aboutsummaryrefslogtreecommitdiffstats
path: root/main/iniparser/APKBUILD
blob: b5bab989f7dcc272ab45ada3b8f3768848f5b0d5 (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=3.1
pkgrel=0
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="http://ndevilla.free.fr/iniparser/iniparser-$pkgver.tar.gz
	rpath.patch"

_builddir="$srcdir"/iniparser
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}" LDFLAGS="$LDFLAGS" \
		libiniparser.so || return 1
}

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="0aa4f995468ed390caf323f50a285bc3  iniparser-3.1.tar.gz
67f622f6a1e5d4631c5c7db6c1f19fcb  rpath.patch"
sha256sums="aedf23881b834519aea5e861b2400606d211da049cd59d3cfb4568e0d9eff5c5  iniparser-3.1.tar.gz
8704113db821b23426861a33792003a846fbc5b27d23ad204bedcbeb7635a984  rpath.patch"
sha512sums="8fd8324c5629fdc3e3eff00afb5f0832402ccc760c5b92db82aa29b340ec891419ca2c4fee3a4d4d67cf9bc51c76b095bc0c458e087c2b8e72ac36867c47ae86  iniparser-3.1.tar.gz
611f8c4a2499d97b9cf86914df09e15bb619fdaedb44195106afbc6376dcf08528ed28102727215ea2191540f6523f689050fc40b71e0b0dc2fdb5e9040ed663  rpath.patch"