aboutsummaryrefslogtreecommitdiffstats
path: root/testing/portablexdr/APKBUILD
blob: 19829bf016de69e6a3bcf541250583da24cf6b0b (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=portablexdr
pkgver=4.9.1
pkgrel=1
pkgdesc="external data representation (XDR) library"
url="http://people.redhat.com/~rjones/portablexdr/"
arch="all"
license="GPLv2+"
depends=""
depends_dev=""
makedepends="$depends_dev libtool"
install=""
subpackages="$pkgname-dev $pkgname-rpcgen"
source="http://people.redhat.com/~rjones/portablexdr/files/portablexdr-$pkgver.tar.gz
	portablexdr-4.9.1-no-config-h.patch
	portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch
	quad-types.patch
"

_builddir="$srcdir"/portablexdr-$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

	# rename byteswap.h so it does not gets pulled in by uclibc headers
	mv byteswap.h _byteswap.h
	sed -i -e 's/byteswap\.h/_byteswap.h/g' \
		Makefile.in *.c
}

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

	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	ln -s portable-rpcgen "$pkgdir"/usr/bin/rpcgen
}

rpcgen() {
	pkgdesc="Portable rpcgen"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

md5sums="949e6dc9815590e5688f18bfdd2a98f9  portablexdr-4.9.1.tar.gz
e5e44853226f8e756aa499299404d505  portablexdr-4.9.1-no-config-h.patch
6d8528d20edd2db618fad96f2afcd926  portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch
c668a7d516c8096651cef92bdf6835b6  quad-types.patch"
sha256sums="5cf4bdd153cf4d44eaf10b725f451d0cfadc070b4b9a9ccfb64094b8f78de72c  portablexdr-4.9.1.tar.gz
75cec27cba9d667d4e137f13fb8e66a3a91344f458691e93d13928f5891216b9  portablexdr-4.9.1-no-config-h.patch
7919d9157537552c34047f8423d3e923fcb79d097b796141d28e05d2c5b8b6e0  portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch
2a75fff6a66cc99af987fe928600c38eb17bb5163e8346a7feafa7374c542ce2  quad-types.patch"
sha512sums="47f2402e7ed9f2f518e2a45e76e8ad6c4b1e7ae1bd9408ca4dca3d0883697e755460ee64eef405e23b1840ad3b89ad54555bdf59dc8bae3cd8b67086d6ab3b1f  portablexdr-4.9.1.tar.gz
4d7dd2c6a40438ca9df8da93dad91295802ddd0cf51f4c2710a0213c34255f119a1c397c8aee9ffb6499baba2c3a39ce2f7ef5a46a2ce87cd8e881f8ab41d1c2  portablexdr-4.9.1-no-config-h.patch
f650a12897256a7194ec125dcac008b4a75b1907bfddcc34c4d23f40f93718072c9958b9eca7afeb1e356a64b5189d71077f765b5592b847d3473b2ee346ae8f  portablexdr-build-use-intptr_t-and-uintptr_t-to-cast-ptr-to-int.patch
8057db443cdb956945a40c2cf9d1f4d59086bd8affc819e36be146c50a7109bf18bd47e1ff69979d1e9187413d37836426b02cec6761987cf1c3483f6ed1f911  quad-types.patch"