aboutsummaryrefslogtreecommitdiffstats
path: root/main/xmlrpc-c/APKBUILD
blob: b0477eabe95fbeecb90dc818f08a7e406c8475cb (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xmlrpc-c
pkgver=1.39.07
pkgrel=0
pkgdesc="This library provides a modular implementation of XML-RPC for C and C++"
url="http://xmlrpc-c.sourceforge.net/"
arch="all"
license="BSD and MIT"
depends=
depends_dev="libxml2-dev"
makedepends="libtool curl-dev libxml2-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-client
	$pkgname-client++:clientxx xmlrpc-c++:cxx $pkgname-abyss"
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tgz
	host-os-uclibc.patch
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	local i
	cd "$_builddir"
	update_config_sub || return 1
	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 \
		--mandir=/usr/share/man \
		--enable-libxml2-backend \
		--disable-cgi-server \
		--disable-libwww-client \
		--disable-wininet-client \
		|| return 1
	# no parallel builds :-(
	make -C include && \
	make -C lib AR=ar RANLIB=ranlib && \
	make -j1 -C src AR=ar RANLIB=ranlib && \
	make AR=ar RANLIB=ranlib
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" AR=ar RANLIB=ranlib install || return 1
	install -m 644 -D doc/COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

client() {
	pkgdesc="C client libraries for xmlrpc-c"
	replaces="$pkgname"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libxmlrpc_client.so.* "$subpkgdir"/usr/lib/
}

clientxx() {
	replaces="libxml-c++"
	pkgdesc="C++ client libraries for xmlrpc-c"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libxmlrpc_client++.so.* "$subpkgdir"/usr/lib/
}

cxx() {
	pkgdesc="This library provides a modular implementation of XML-RPC for C++"
	replaces="$pkgname"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*++* \
		"$pkgdir"/usr/lib/libxmlrpc_packetsocket.so.* \
		"$pkgdir"/usr/lib/libxmlrpc_cpp.so.* \
		"$subpkgdir"/usr/lib/
}

abyss() {
	pkgdesc="Abyss server libraries for C++"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*abyss* \
		"$subpkgdir"/usr/lib/
}

md5sums="cb8d3df3d40be16dd4cadc3d650d1964  xmlrpc-c-1.39.07.tgz
d3bee91077d3c7e1c0b80f6d7eeb2e63  host-os-uclibc.patch"
sha256sums="b79aaa657084e26e7b732502f07b3af68375e37aeb1d1cd577ea3a413d7e1af3  xmlrpc-c-1.39.07.tgz
0aae483973387c710ddc6103be36287cfe507eaa2e998805e6aa858be8eeaaa5  host-os-uclibc.patch"
sha512sums="471f4325cc3bcb900b39b53f302d4ffb423cab5cdb8ad4190478972a87e1df2b0ebc246fb4351e8ee4e043c86167ca07cf3349b9de1c766287ac20ed4997b4a4  xmlrpc-c-1.39.07.tgz
30b57c5ffd65ea9781a56d1b4535e53c9d51c16e00d269992b239f1ff611fe3a510eb72b4d6ee96100706161d40738bbdf109580c745bfc9899d540ca6b3f1e5  host-os-uclibc.patch"