aboutsummaryrefslogtreecommitdiffstats
path: root/main/libtirpc/APKBUILD
blob: 8fecefa8fa6bb22ed1f30b01135726f6fd5248c5 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libtirpc
pkgver=0.2.4
pkgrel=1
pkgdesc="Transport Independent RPC library (SunRPC replacement)"
url="http://libtirpc.sourceforge.net/"
arch="all"
license="GPL2"
depends=
depends_dev="krb5-dev"
makedepends="$depends_dev autoconf automake libtool"
subpackages="$pkgname-dev $pkgname-doc"
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2
	nis.h
	libtirpc-no-des.patch
	musl-compliance.patch
	"

prepare() {
	cd "$srcdir"/$pkgname-$pkgver

	# uclibc/musl does not provide nis.h so provide our own
	mkdir src/rpcsvc
	cp "$srcdir"/nis.h src/rpcsvc/

	# -DGQ makes tirpc implement getrpcbynumber
	[ "$CLIBC" == musl ] && export CFLAGS="$CFLAGS -DGQ"

	for i in $source; do
		case $i in
		*.patch)
			msg "Applying $i"
			patch -N -p1 -i "$srcdir"/$i || return 1
			;;
		esac
	done

	libtoolize --force && aclocal -I m4 && autoconf \
		&& automake --add-missing || return 1
}

build() {
	cd "$srcdir"/$pkgname-$pkgver
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-gss \
		|| return 1
	make || return 1
}

package() {
	cd $srcdir/$pkgname-$pkgver
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la || return 1
}

md5sums="847995e8d002cbf1387bda05947be086  libtirpc-0.2.4.tar.bz2
082dff1bc78bdcbac6d305c1534fe3c0  nis.h
80e8f54aab0f5bed37e58ad79fe4ff2b  libtirpc-no-des.patch
03346638e924d4c811a55d0cbeee7320  musl-compliance.patch"
sha256sums="45c3e21dfc23a5ba501f9dfc6671678316fdfdb8355a1ec404ae2aa2f81943a1  libtirpc-0.2.4.tar.bz2
7149d53da167168cbad9e75cbab302768f659e59e208763b1bf5df2a6ff3bfdb  nis.h
5b7c8f6d19f17541902dfd1b1132f2b07e4cc0987152d4e8007243e776d4d47f  libtirpc-no-des.patch
9f7b24fe9297af917826c1d3fba4909d76f2ddb0a66db417ae8026a39715cc49  musl-compliance.patch"
sha512sums="8b7fec13d34ad0ddfa3832f4a4955607d94f6a691fedcc81a98554345f6c6e64d5f289490a10a80600cebf5b53cfad99c0d78007b88f8f2fbc60cbb8680fc87f  libtirpc-0.2.4.tar.bz2
15edac1e30cc1aa65ca495bae14c6c7455d65ca539b7e5c865c3fbd5a51c76966b37dd34e9a6483aadcaea3602aefb0b48cdb46f877dae1c65dfa6840dfd8c54  nis.h
9a984a7741deb943f92cd8a9f23d1a0e09a01e91aa88268456ccbb7998b24f50ad431e26400def3a8ba9d6cd345e5abccf5acf9c59708ce8f0653275c2ea5d61  libtirpc-no-des.patch
5df2a92838a6c15ff26dc0a75b0599c42f95b6fbda7dd407b975118e79519e6bdbc77307aa6c4bda33c5a2e4cacabf996900220f140b1e121ece198c33d21b13  musl-compliance.patch"