summaryrefslogtreecommitdiffstats
path: root/main/nfs-utils/APKBUILD
blob: 2f25b4d3146de22585783f34f86833c31d32f3d3 (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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=nfs-utils
pkgver=1.2.9
pkgrel=1
pkgdesc="kernel-mode NFS"
url="http://nfs.sourceforge.net/"
arch="all"
license="GPL"
depends="rpcbind"
makedepends="util-linux-dev libtirpc-dev libcap-dev libevent-dev
	libnfsidmap-dev keyutils-dev lvm2-dev krb5-dev sqlite-dev
	autoconf automake libtool"
subpackages="$pkgname-doc"
[ "$ALPINE_LIBC" != "eglibc" ] && subpackages="$subpackages rpcgen"

source="http://downloads.sourceforge.net/nfs/$pkgname-$pkgver.tar.bz2
	nfs.initd
	nfsmount.initd
	rpc.gssd.initd
	rpc.idmapd.initd
	rpc.pipefs.initd
	rpc.statd.initd
	rpc.svcgssd.initd

	nfs.confd
	nfs.exports

	0001-conffile-use-standard-uint-_t-and-unsigned-char.patch
	0002-Fix-header-include-for-definition-of-NULL.patch
	0003-replace-__attribute_malloc__-with-the-more-portable-.patch
	0004-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch
	0005-exportfs-define-_GNU_SOURCE-for-stat64.patch
	0006-mountd-define-_GNU_SOURCE-for-statfs64-and-use-stand.patch
	0007-nfsstat-replace-the-legacy-SA_ONESHOT-with-standard-.patch

	nfs-utils-mtab-sym.patch
	uclibc-getaddrinfo-canonname.patch
	"

prepare() {
	cd "$srcdir/$pkgname-$pkgver"
	for i in $source; do
		case $i in
		*.patch) msg "Applying $i"
			patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	# fix build on eglibc
	if [ "$ALPINE_LIBC" != "eglibc" ]; then
		sed -i -e '/^#include <libio.h>/d' \
			support/include/sockaddr.h || return 1
	fi
	# busybox install fix
	sed -i 's/--mode 755/-m755/g' \
		tools/nfs-iostat/Makefile.am \
		tools/nfs-iostat/Makefile.in \
		tools/mountstats/Makefile.am \
		tools/mountstats/Makefile.in || return 1

	./autogen.sh || return 1
}

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

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--without-tcp-wrappers \
		--enable-ipv6 \
		--enable-nfsv4 \
		--enable-uuid \
		--enable-gss \
		--enable-libmount-mount \
		|| return 1

	make || return 1
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	make -j1 DESTDIR="$pkgdir" install

	for i in nfs rpc.pipefs rpc.svcgssd nfsmount rpc.idmapd rpc.gssd \
			rpc.statd; do
		install -m755 -D "$srcdir"/$i.initd "$pkgdir"/etc/init.d/$i \
			|| return 1
	done


	install -m644 -D "$srcdir"/nfs.confd "$pkgdir"/etc/conf.d/nfs
	install -m644 -D "$srcdir"/nfs.exports "$pkgdir"/etc/exports
}

rpcgen() {
	pkgdesc="Remote Procedure Call (RPC) protocol compiler"
	cd "$srcdir/$pkgname-$pkgver"
	install -m755 -D tools/rpcgen/rpcgen "$subpkgdir"/usr/bin/rpcgen
}

md5sums="18869d16db3f49c053f8c68eba3fe2e0  nfs-utils-1.2.9.tar.bz2
9e402e75f23b886fce2f53bec2c1d415  nfs.initd
d514fb87ce5de9909f43d99012352f09  nfsmount.initd
144b0e1f7d32265abe4c499a47af6154  rpc.gssd.initd
650f68e51a02ba84c272960fc302c445  rpc.idmapd.initd
80772890099fafdb8af3d6dd3db242c2  rpc.pipefs.initd
37fdb069a5fcabea507012497bb95c53  rpc.statd.initd
20e71ab412555b2dc9b50f346f68e5c8  rpc.svcgssd.initd
09135438d6df50b868bbe5a2260f973c  nfs.confd
4f1bb7b2412ce5952ecb5ec22d8ed99d  nfs.exports
e78522fa674479e26efbb07e1f533343  0001-conffile-use-standard-uint-_t-and-unsigned-char.patch
db146c3e263de1825ec94dd62167d79c  0002-Fix-header-include-for-definition-of-NULL.patch
4bf2fd07d60fbebb0b3dd7d5cef34b9b  0003-replace-__attribute_malloc__-with-the-more-portable-.patch
14b241265b47f698aae7818d2cfb3051  0004-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch
5dc7e475e8bf2ae3df304cf9db6454a7  0005-exportfs-define-_GNU_SOURCE-for-stat64.patch
334e6124ce5cb3a1c75c426ab6669ba6  0006-mountd-define-_GNU_SOURCE-for-statfs64-and-use-stand.patch
ed80396c06a84bb86d9f6a1f88b2afbc  0007-nfsstat-replace-the-legacy-SA_ONESHOT-with-standard-.patch
2b2d228f9947581c924a691a84664fa1  nfs-utils-mtab-sym.patch
37a82a3a81410b483790ca30d564f4ba  uclibc-getaddrinfo-canonname.patch"
sha256sums="90b76d5692a520b74273e607a4fd69df4cc35f65e242e22e2bc61b58759722f3  nfs-utils-1.2.9.tar.bz2
81b546cb98be4678cd22f4da39927d2c79532717d927bfba055af447dbff26a5  nfs.initd
f2f5b54fef59f24a1fc6a8b814dfe2cfdeeb02fd0d5041cff31650e626fe4b75  nfsmount.initd
00d9c29280a83e8458c33139d04a9b38c6fdba9d7cb9b420ca83bf6b10e6435d  rpc.gssd.initd
3ce65326859c43983dad25ad2d4731488c488037796e39b6b5eda336e8bf81ef  rpc.idmapd.initd
d651ad9099ea443282476fcedf52c00f0a274eb6a9e4b58a5838780369206973  rpc.pipefs.initd
a727948ccf665b6bb1977ac3014b7086ff654173d1a2be1e2b38a43e97f84ca8  rpc.statd.initd
f1c460d8b0e91e54a551397d755135d05a3728d81de596535bf8bda074455677  rpc.svcgssd.initd
9ca3b7dfbac5bedd818a3637805380f4e873ef8e809c21c26f410c86ac16e03e  nfs.confd
f2aaf1c92e07172adeb65f7f2bc0140c533ae453a3477e99be677ef2e05f2d4b  nfs.exports
a49a858dd127aeff608e2facd3734765e6113e2e26120d1b5a1a1feacb270157  0001-conffile-use-standard-uint-_t-and-unsigned-char.patch
11ea62d8b2c5c9ea050ddd04c43cbe7169c097f2ba1402dff0b5340d88e7a972  0002-Fix-header-include-for-definition-of-NULL.patch
d0d76cbe0a7929019b29690e2a43bada5f51a18bb4db9172212969c32dfefd38  0003-replace-__attribute_malloc__-with-the-more-portable-.patch
0a4099ec1c38ed19b3f9fe9c6c068b16aeff37294287ddc0ea637e8bd58af718  0004-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch
7987f2e9a54e31008e0116ca63aba120005ded2b0404f2ab73d866c021975dd3  0005-exportfs-define-_GNU_SOURCE-for-stat64.patch
ab843e7feb4d51d44bd4d185867b30ed0bbeec2d27ce947689b5b0cb072b0a15  0006-mountd-define-_GNU_SOURCE-for-statfs64-and-use-stand.patch
47fc077b1093388f6a81bd69eb41dce624d4f5aa4c2cf66f192c23ddd9963f30  0007-nfsstat-replace-the-legacy-SA_ONESHOT-with-standard-.patch
5a1c6875f43ecc93d5db7bcf84b4ceda16c09b6109c28696eb55d05247511706  nfs-utils-mtab-sym.patch
7c7451365001f1672abd6fd6dd53da03617a9baa4758ec515b3adf8b7bb7ad93  uclibc-getaddrinfo-canonname.patch"
sha512sums="c71f986a7e8f38492f8411540b32fef904f689b45b831e0e3c193628085d09742c6352dc42d6d374b8ded12e2b54f8fb3c8de66695a36cf038fc4afa5c29879e  nfs-utils-1.2.9.tar.bz2
98eeae4b30fe13d6fdeb62d47e05fd5bc577946d84a3fe84703dcc90c58768f0d1886a0aa9262ead3aac5c4bd6d7b1cc2b703fb9603baffad4ac2ead635294f3  nfs.initd
8e720417d7443c6bd4e3bda9e7bf4a61b073009fc1750ec0c7378fb01d726ee827a759c6bc10629606b4f2dbd7884807a9e0b8377382e4968f06ef8e938537ae  nfsmount.initd
cd4f763c7cced0eecb03e2d4c8fb1d5fbbddd119a014dee4e9cb881d3750fb01a50daa4475700914785cb1313ceef638b7de4d8dddac90cbab63888cc81938f6  rpc.gssd.initd
624ac8c5a381a0ccc1bb7dfd06c080a9de85a9e94e1d4071a6ef401e1b20f0d05d767be5e85eea374c3a4c29218b3db6013383afa0bdd1a7f61b77260675bfdb  rpc.idmapd.initd
46a423a58ba67b02f0075e2e06d4fe9aee9b05662f6f7e4ddfd5ac5763eb562a3402ab8427f351bfb3ac0c2feeefc5475ecf4e41be5f690f10c63b2ee3146398  rpc.pipefs.initd
cf0272e42310b1ff8d40ff37dc839df2dd4fba4cb408f8fa67ce445e2975b37cafbb35e6d41af2bb462fd05bdd444ba297a156daadcf50e1d73b322d6abeea17  rpc.statd.initd
844e8d41a6a8b632d98585724aca2e9ae596f72c67e17e4e8fb9eb81e6c58eed9e10cf8b2a96896dba8fd1efaa95d846954e712bdf3402a847ae17742dae2157  rpc.svcgssd.initd
1711803f848f73fef9fa74bd572fa7643c586f06eeedf62ed91bd2aa06ad59c7b1f1c585b6f7b7a8ce67ff7fd6b601d88dc99ca1000dd1d3f5991f420da9761b  nfs.confd
70f96bb3a465ee0fa857a6e511051ca3ced9f5a5d1e6b8b32eec843a2067f2475d8979c724a3661de0a2b078eef143f55d75ed184d823841d9de5038da91fb91  nfs.exports
1b59dcb7f7a11a0cd8ee4ab25f22f85a57a3e8fd5fb54eb6add1a4933b5a96d333b3bff3955d36999a1f9b0b312b52c83e4efc5ed0cdecbd305a95e676129f6d  0001-conffile-use-standard-uint-_t-and-unsigned-char.patch
18f5c50ace27d88984b85b0fa529257ba151ec2295af8f66b3637b32df817063426ab56d1c9eca4b6437614338ff74865cd918c12695927b4da6af6b639dd0ed  0002-Fix-header-include-for-definition-of-NULL.patch
bdef9397da387b51b9774e21c92b0850c082d6b250bfbecc680e5b22cd8fb7f14fea7e4f4febeefbd56494bfe4e56f585880664d6413b0f1290eac06d5b7712f  0003-replace-__attribute_malloc__-with-the-more-portable-.patch
495642168b11a642581dd574b2f0530a5bf7b6c5e89fae4926d8427afc6bb01e5170d9348207d3b97af7d70b795ebf208fb04a41636556d9ca66c0cee1554962  0004-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch
80ba9146befdcb9d60625f9d224145a34cae2614ff69e91357b3c3049ff983f82ebad1b29a8a17ae2e16062f685d1660cc6007bb4287fcdc6b7e889a1b8a3f82  0005-exportfs-define-_GNU_SOURCE-for-stat64.patch
c41e853bc156ab37cfe074a9c14d13fa94d3efff1351861668fe09cc6f1079b8d695ddb857a214db607500cef946d1aba45d748bd839a0184cd8ea5f34f8cb2d  0006-mountd-define-_GNU_SOURCE-for-statfs64-and-use-stand.patch
939c11c66532c5a70699fa01744dfe2ffb2926307c771e055f4e04132b58f4715d7f81e233911a4ac1c0715190e64b7d2fff3a007c02cea939fee98351b3ca16  0007-nfsstat-replace-the-legacy-SA_ONESHOT-with-standard-.patch
5fd9039a61a0cdaeb57b5332ea545034101e6f15be200b7cf8fc7d0a3d22836a6fc778e0560656c1825808a4dc09046d9923d81b4d1324a6e526b226c657d064  nfs-utils-mtab-sym.patch
b9f0820773d3ab82cfa9ba603c83f98a71ad2e7205418c1223344b5b3e1bdfbb6aa183ab830df25ded660a4950d0e54098485fa08a4f6b6363a62c0f6c713489  uclibc-getaddrinfo-canonname.patch"