summaryrefslogtreecommitdiff
path: root/testing/nfs-utils/PKGBUILD
blob: 2392879c26628dfbabe081fd4a1a5c5ab86abfd5 (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
# $Id: PKGBUILD 168633 2012-10-13 16:48:28Z thomas $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: John Proctor <jproctor@prium.net>
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>
# Contributor: abelstr <abel@pinklf.eu>
# Contributor: Marco Lima <cipparello gmail com>

pkgname=nfs-utils
pkgver=1.2.6
pkgrel=2
pkgdesc="Support programs for Network File Systems"
arch=('i686' 'x86_64')
url='http://nfs.sourceforge.net'
license=('GPL')
backup=(etc/{exports,idmapd.conf,nfsmount.conf} etc/conf.d/{nfs-common.conf,nfs-server.conf})
depends=('glibc' 'e2fsprogs' 'rpcbind' 'libtirpc>=0.2.1' 'librpcsecgss>=0.19-2' 'nfsidmap' 'libevent>=2.0.10' 'libgssglue' 'device-mapper')
makedepends=('pkgconfig' 'autoconf' 'automake')
source=(http://downloads.sourceforge.net/project/nfs/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2
	nfs-common
	nfs-common.conf
	nfs-server
	nfs-server.conf
	exports
	idmapd.conf
	start-statd.patch
        nfs
	nfs-utils-1.1.4-mtab-sym.patch
	nfs-utils-1.1.4-no-exec.patch
	rpc-gssd.service
	rpc-mountd.service
	rpc-svcgssd.service
	rpc-idmapd.service
	rpc-statd.service
	nfsd.service
	var-lib-nfs-rpc_pipefs.mount
	proc-fs-nfsd.mount
	blkmapd.service
	nfs-utils.conf)
install=nfs-utils.install
md5sums=('8be543ca270c2234ff18f8c8d35e0d37'
         'dd0d65fc6e8f422fa12520813098264b'
         'f73f197a16b02c3e248488ec35c4cf43'
         'e619f18354ff958ed624d05d08853d8f'
         '9cef69bc686cc5dcac23fbb51450747d'
         'ff585faf410a62c4333a027c50b56bae'
         'eb4f4027fab6fc1201f1ca04f5954c76'
         'e9144277a89a620d9bc80413158a7d27'
         'f5e7bba09a46c5c5d7007cac6eff9df5'
         '7674106eaaa4c149bccd4f05fe3604e9'
         '4f4827dfc93008dfadd0a530ad0872b2'
         '3694619813cebc5b4502b58f1992b442'
         '965311784d49a7d126d512cadbe91deb'
         'e05705d9ccccaeaeb1ecaee20adc05bc'
         '359d84a85f8781dc3f45f4cf1dbe4b53'
         'c82ef7b238efe62af3d5e263e1ba1c5c'
         '5d33d2e754fd37280365b287603bac90'
         '1cd65909fa0983047f3f06a3ab352401'
         '02a34835aa077146a90eb7d191e612d0'
         '8ffc2ebe932d29efe17d6f3f23d5b975'
         '8ac484023d786766d287ccbe878ae4ba')

build() {
  cd $srcdir/${pkgname}-${pkgver}
  patch -Np1 -i ../nfs-utils-1.1.4-mtab-sym.patch
  #patch -Np1 -i ../nfs-utils-1.1.4-no-exec.patch
  # arch specific patch
  patch -Np0 -i $srcdir/start-statd.patch

  ./configure --prefix=/usr --enable-nfsv4 --enable-nfsv41 --enable-gss \
              --without-tcp-wrappers --with-statedir=/var/lib/nfs \
              --enable-ipv6 --sysconfdir=/etc --enable-libmount-mount \
              --enable-mountconfig

  make 
}

package() {
  cd $srcdir/${pkgname}-${pkgver}
  # fix make install
  mkdir -p $pkgdir/sbin
  make DESTDIR=$pkgdir install

  # support python2 (FS#25120)
  sed -i '1s/python$/python2/' "$pkgdir"/usr/sbin/{nfsiostat,mountstats}

  # NFS & NFSv4 init scripts
  install -D -m 755 ../nfs-common "$pkgdir/"etc/rc.d/nfs-common
  install -D -m 755 ../nfs-server "$pkgdir/"etc/rc.d/nfs-server
  # Configuration
  install -D -m 644 ../exports "$pkgdir/"etc/exports
  install -D -m 644 ../idmapd.conf "$pkgdir/"etc/idmapd.conf
  install -D -m 644 ../nfs-common.conf "$pkgdir/"etc/conf.d/nfs-common.conf
  install -D -m 644 ../nfs-server.conf "$pkgdir/"etc/conf.d/nfs-server.conf
  install -D -m 644 ../nfs "$pkgdir/"etc/conf.d/nfs
  install -D -m 644 utils/mount/nfsmount.conf "$pkgdir/"etc/nfsmount.conf
  # systemd files
  for i in ${srcdir}/*.{service,mount}; do
    install -D -m 644 $i "$pkgdir/usr/lib/systemd/system/${i##*/}"
  done
  install -D -m 644 ../nfs-utils.conf "$pkgdir/"usr/lib/modules-load.d/nfs-utils.conf
  # directories
  mkdir "$pkgdir/"etc/exports.d
  mkdir "$pkgdir/"var/lib/nfs/rpc_pipefs
  mkdir "$pkgdir/"var/lib/nfs/v4recovery
}