aboutsummaryrefslogtreecommitdiffstats
path: root/testing/portablexdr/APKBUILD
blob: 2b9be0b051a7774a393be3b61cac3c22f8bcd54d (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
# 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
"

_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
	rm -f "$pkgdir"/usr/lib/*.la
	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"