aboutsummaryrefslogtreecommitdiffstats
path: root/main/nfs-utils/APKBUILD
blob: 03ef309fa06595024586f6159d9072f20504f3af (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=nfs-utils
pkgver=1.2.6
pkgrel=2
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"
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
	nfs-utils-mtab-sym.patch
	uclibc-getaddrinfo-canonname.patch
	osd_login.patch"

prepare() {
	cd "$srcdir/$pkgname-$pkgver"
	for i in "$srcdir"/*.patch; do
		msg "Applying $i"
		patch -p0 -i "${i}" || return 1
	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
}

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

	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--without-tcp-wrappers \
		--enable-nfsv4 \
		--enable-uuid \
		--disable-gss \
		--enable-mount \
		--with-statedir=/var/lib/nfs

	make || return 1
}

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

	for i in nfs rpc.gssd rpc.pipefs rpc.svcgssd nfsmount rpc.idmapd \
			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="8be543ca270c2234ff18f8c8d35e0d37  nfs-utils-1.2.6.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
a3a7338f8de3ac37c1ffc05bdcb77d16  nfs-utils-mtab-sym.patch
37a82a3a81410b483790ca30d564f4ba  uclibc-getaddrinfo-canonname.patch
3a1e3ff3de39a211f6d4d3ecb16b37aa  osd_login.patch"