aboutsummaryrefslogtreecommitdiffstats
path: root/main/nfs-utils/APKBUILD
blob: 633625d410a572aa10c998831fd72d7a06837bb8 (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=nfs-utils
pkgver=1.2.3
pkgrel=0
pkgdesc="kernel-mode NFS"
url="http://nfs.sourceforge.net/"
arch="all"
license="GPL"
depends="rpcbind"
makedepends="util-linux-ng-dev libtirpc-dev libcap-dev"
subpackages="$pkgname-doc 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-no-exec.patch
	nfs-utils-mtab-sym.patch"

prepare() {
	cd "$srcdir/$pkgname-$pkgver"
	for i in "$srcdir"/*.patch; do
		msg "Applying $i"
		patch -p0 -i "${i}" || return 1
	done
	sed -i -e '/^#include <libio.h>/d' support/include/sockaddr.h
	# 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
}

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

	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--without-tcp-wrappers \
		--disable-nfsv4 \
		--enable-uuid \
		--disable-gss \
		--enable-mount \
		--enable-nfsv3 \
		--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="1131dc5f27c4f3905a6e7ee0d594fd4d  nfs-utils-1.2.3.tar.bz2
f1873e0441b8c3b4b90023c038d755ec  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
5e0963b0889e779ff36af0299d17d6cb  nfs-utils-no-exec.patch
a3a7338f8de3ac37c1ffc05bdcb77d16  nfs-utils-mtab-sym.patch"