OCaml 4.14.0 rebuild
[arch-packages.git] / nfs-utils / trunk / PKGBUILD
blobc605ce955fe7dc3f917364784104a5255e1b41c4
1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
2 # Maintainer: Tobias Powalowski <tpowa@archlinux.org>
3 # Contributor: John Proctor <jproctor@prium.net>
4 # Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>
5 # Contributor: abelstr <abel@pinklf.eu>
6 # Contributor: Marco Lima <cipparello gmail com>
8 pkgbase=nfs-utils
9 pkgname=('nfs-utils' 'nfsidmap')
10 pkgver=2.6.1
11 pkgrel=1
12 arch=('x86_64')
13 url='http://nfs.sourceforge.net'
14 makedepends=('libevent' 'sqlite' 'rpcsvc-proto' 'device-mapper')
15 # http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=summary
16 source=(https://www.kernel.org/pub/linux/utils/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.{xz,sign}
17         exports)
18 # https://mirrors.edge.kernel.org/pub/linux/utils/nfs-utils/2.6.1/sha256sums.asc
19 sha256sums=('60dfcd94a9f3d72a12bc7058d811787ec87a6d593d70da2123faf9aad3d7a1df'
20             'SKIP'
21             'b8238b74179f7e1626db2b637671ddc17288a1c5b7692954ae6d2fbb1be3788d')
22 validpgpkeys=('E1B71E339E20A10A676F7CB69AFB1D681A125177') # Steve Dickson
24 prepare() {
25   cd "${pkgbase}"-${pkgver}
27   # fix hardcoded sbin path to our needs
28   sed -i "s|sbindir = /sbin|sbindir = /usr/bin|g" utils/*/Makefile.am
29   sed -i "s|sbin|bin|" utils/nfsidmap/id_resolver.conf
30   autoreconf -vfi
33 build() {
34   cd "${pkgbase}"-${pkgver}
35   ./configure --prefix=/usr \
36     --sbindir=/usr/bin \
37     --sysconfdir=/etc \
38     --enable-nfsv4server \
39     --enable-gss \
40     --without-tcp-wrappers \
41     --with-statedir=/var/lib/nfs \
42     --enable-ipv6 \
43     --enable-libmount-mount \
44     --enable-mountconfig \
45     --with-start-statd=/usr/bin/start-statd \
46     --with-systemd
47   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
48   make
51 check() {
52   cd "${pkgbase}"-${pkgver}
53   make -k check || /bin/true
56 package_nfs-utils() {
58   pkgdesc="Support programs for Network File Systems"
59   license=('GPL2')
61   backup=(etc/{exports,nfs.conf,nfsmount.conf}
62           var/lib/nfs/{etab,rmtab})
63   depends=('rpcbind' 'nfsidmap' 'gssproxy' 'libevent' 'device-mapper')
64   optdepends=('sqlite: for nfsdcltrack usage'
65               'python: for nfsiostat, nfsdclnts and mountstats usage')
67   cd "${pkgbase}"-${pkgver}
68   make DESTDIR="$pkgdir" install
70   install -D -m 644 utils/mount/nfsmount.conf "$pkgdir"/etc/nfsmount.conf
71   install -D -m 644 nfs.conf "$pkgdir"/etc/nfs.conf
72   
73   install -d -m 755 "$pkgdir"/usr/share/doc/$pkgname
74   install -D -m 644 systemd/README "$pkgdir"/usr/share/doc/$pkgname/README.systemd
75   
76   # docs
77   install -m 644 {NEWS,README} "$pkgdir"/usr/share/doc/$pkgname/
79   # empty exports file  
80   install -D -m 644 ../exports "$pkgdir"/etc/exports
82   # config file for idmappers in newer kernels
83   install -D -m 644 utils/nfsidmap/id_resolver.conf "$pkgdir"/etc/request-key.d/id_resolver.conf
85   mkdir "$pkgdir"/etc/exports.d
86   mkdir -m 555 "$pkgdir"/var/lib/nfs/rpc_pipefs
87   mkdir "$pkgdir"/var/lib/nfs/v4recovery
89   # nfsidmap cleanup
90   rm -vrf "$pkgdir"/usr/include #/nfsid*
91   rm -vrf "$pkgdir"/usr/lib/libnfsidmap*
92   rm -vrf "$pkgdir"/usr/lib/pkgconfig #/libnfsidmap.pc
93   rm -v "$pkgdir"/usr/share/man/{man3/nfs4_uid_to_name*,man5/idmapd.conf*}
94   rm -rf "$pkgdir"/usr/share/man/man3
97 package_nfsidmap() {
99   pkgdesc="Library to help mapping IDs, mainly for NFSv4"
100   license=('GPL2')
101   backup=(etc/idmapd.conf)
102   depends=('libldap' 'krb5')
104   cd "${pkgbase}"-${pkgver}
105   make -C support  DESTDIR="$pkgdir" install
106   # config file  
107   install -D -m 644 support/nfsidmap/idmapd.conf "$pkgdir"/etc/idmapd.conf
108   # license
109   install -Dm644 support/nfsidmap/COPYING $pkgdir/usr/share/licenses/nfsidmap/LICENSE