summaryrefslogtreecommitdiff
path: root/core/nfs-utils/PKGBUILD
blob: 5ab1396343d84136424f91bc3ecc177baebab9b2 (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 203559 2014-01-13 16:35:26Z tpowa $
# 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.9
pkgrel=5
pkgdesc="Support programs for Network File Systems"
arch=('i686' 'x86_64' 'mips64el')
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' 'sqlite')
source=(http://downloads.sourceforge.net/project/nfs/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2
	nfs-common.conf
	nfs-server.conf
	exports
	idmapd.conf
	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
	nfs-client.target
	nfs-server.target
	blkmapd.service
	nfs-utils.conf
        id_resolver.conf
        start-statd.patch)
install=nfs-utils.install
optdepends=('sqlite: for nfsdcltrack usage')
md5sums=('18869d16db3f49c053f8c68eba3fe2e0'
         'f73f197a16b02c3e248488ec35c4cf43'
         '9cef69bc686cc5dcac23fbb51450747d'
         'e6ad3c7a59c7e4c24965a0e7da35026c'
         'eb4f4027fab6fc1201f1ca04f5954c76'
         '7674106eaaa4c149bccd4f05fe3604e9'
         '4f4827dfc93008dfadd0a530ad0872b2'
         'b9329c9d4a6b4a72ab2a04aac9229171'
         '656ac433c4443eba6b47744a53a3c7d9'
         '295ec0c9c049e146992561650fec9d52'
         '6ff4f297df4e90440b8bdbc6b1a78480'
         '20d5b8120d1049b27dd44dc4c57f667d'
         '01a1dd533382630ccecc9b882c47aa2f'
         'f48da2fb07b1d5f016d63c16b0979ebb'
         '972eb80ff8c94c647b977a8a3cdd985f'
         'a13e9f388cd939d68fa6ada205eb4e25'
         '1ee3eea917131f04bb08f2f858be7724'
         'f513ab0eae74918df08f329b0c6a9b6f'
         '8ac484023d786766d287ccbe878ae4ba'
         'a43aabf0b8d02406b1babc3a206d952a'
         'f8bb29c2ca1ce178e6371091a3e1090d')

prepare() {
  cd $srcdir/${pkgname}-${pkgver}
  patch -Np1 -i ../nfs-utils-1.1.4-mtab-sym.patch
  # fix /usr/bin in start-statd shell script
  patch -Np1 -i ../start-statd.patch
  #patch -Np1 -i ../nfs-utils-1.1.4-no-exec.patch
}

build() {
  cd $srcdir/${pkgname}-${pkgver}
  ./configure --prefix=/usr --sbindir=/usr/bin --enable-nfsv4 --enable-nfsv41 --enable-gss \
              --without-tcp-wrappers --with-statedir=/var/lib/nfs \
              --enable-ipv6 --sysconfdir=/etc --enable-libmount-mount \
              --with-gssglue \
              --enable-mountconfig --with-start-statd=/usr/bin/start-statd
  # move mount helpers to /usr/bin
  sed -i -e 's#sbindir = /sbin#sbindir = /usr/bin#g' utils/mount/Makefile
  # move osd_login to /usr/bin
  sed -i -e 's#sbindir = /sbin#sbindir = /usr/bin#g' utils/osd_login/Makefile
  make 
}

package() {
  cd $srcdir/${pkgname}-${pkgver}

  make DESTDIR="$pkgdir" install
  sed -i '1s/python$/python2/' "$pkgdir"/usr/bin/{nfsiostat,mountstats}
  install -D -m 644 utils/mount/nfsmount.conf "$pkgdir"/etc/nfsmount.conf

  cd ..
  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 exports          "$pkgdir"/etc/exports
  install -D -m 644 idmapd.conf      "$pkgdir"/etc/idmapd.conf
  install -D -m 644 id_resolver.conf "$pkgdir"/etc/request-key.d/id_resolver.conf
  install -D -m 644 nfs-utils.conf   "$pkgdir"/usr/lib/modules-load.d/nfs-utils.conf
  for i in *.service *.mount *.target; do
    install -D -m 644 $i "$pkgdir"/usr/lib/systemd/system/$i
  done
  mkdir "$pkgdir"/etc/exports.d
  mkdir -m 555 "$pkgdir"/var/lib/nfs/rpc_pipefs
  mkdir "$pkgdir"/var/lib/nfs/v4recovery
}