sbcl rebuild
[arch-packages.git] / nfs-utils / trunk / PKGBUILD
blob43c80fb42facb4b274e0990707451470900e8a2a
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.2
11 pkgrel=1
12 arch=('x86_64')
13 url='http://nfs.sourceforge.net'
14 makedepends=('libevent' 'sqlite' 'rpcsvc-proto' 'device-mapper')
15 options=('debug')
16 # http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=summary
17 source=(https://www.kernel.org/pub/linux/utils/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.{xz,sign}
18         exports
19         sysusers.d)
20 # https://mirrors.edge.kernel.org/pub/linux/utils/nfs-utils/2.6.2/sha256sums.asc
21 sha256sums=('5200873e81c4d610e2462fc262fe18135f2dbe78b7979f95accd159ae64d5011'
22             'SKIP'
23             'b8238b74179f7e1626db2b637671ddc17288a1c5b7692954ae6d2fbb1be3788d'
24             '8e1b6aa59cf5539b9da13cfec217b3ca7b6c32e08df3b0a204901ed2891b2ded')
25 validpgpkeys=('E1B71E339E20A10A676F7CB69AFB1D681A125177') # Steve Dickson
27 prepare() {
28   cd "${pkgbase}"-${pkgver}
30   # fix hardcoded sbin/libexec path to our needs
31   sed -i "s|sbindir = /sbin|sbindir = /usr/bin|g" utils/*/Makefile.am
32   sed -i "s|sbin|bin|" utils/nfsidmap/id_resolver.conf
33   sed -i "s|sbin|usr/bin|" systemd/50-nfs.conf
34   sed -i "s|/sbin|/usr/bin|" systemd/50-nfs.conf
35   sed -i "s|libexec|bin|" tools/nfsrahead/99-nfs.rules
36   autoreconf -vfi
39 build() {
40   cd "${pkgbase}"-${pkgver}
41   ./configure --prefix=/usr \
42     --sbindir=/usr/bin \
43     --sysconfdir=/etc \
44     --libexecdir=/usr/bin \
45     --with-statedir=/var/lib/nfs \
46     --with-statdpath=/var/lib/nfs/statd \
47     --with-start-statd=/usr/bin/start-statd \
48     --enable-nfsv4server \
49     --enable-gss \
50     --without-tcp-wrappers \
51     --enable-ipv6 \
52     --enable-libmount-mount \
53     --enable-mountconfig \
54     --with-systemd
55   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
56   make
59 check() {
60   cd "${pkgbase}"-${pkgver}
61   #make -k check || /bin/true
62   make check
65 package_nfs-utils() {
67   pkgdesc="Support programs for Network File Systems"
68   license=('GPL2')
70   backup=(etc/{exports,nfs.conf,nfsmount.conf}
71           var/lib/nfs/{etab,rmtab})
72   depends=('rpcbind' 'nfsidmap' 'gssproxy' 'libevent' 'device-mapper')
73   optdepends=('sqlite: for nfsdcltrack usage'
74               'python: for rpcctl, nfsiostat, nfsdclnts and mountstats usage')
76   cd "${pkgbase}"-${pkgver}
77   make DESTDIR="$pkgdir" install
79   install -D -m 644 utils/mount/nfsmount.conf "$pkgdir"/etc/nfsmount.conf
80   install -D -m 644 nfs.conf "$pkgdir"/etc/nfs.conf
81   
82   install -d -m 755 "$pkgdir"/usr/share/doc/$pkgname
83   install -D -m 644 systemd/README "$pkgdir"/usr/share/doc/$pkgname/README.systemd
85   # docs
86   install -m 644 {NEWS,README} "$pkgdir"/usr/share/doc/$pkgname/
88   # empty exports file  
89   install -D -m 644 ../exports "$pkgdir"/etc/exports
91   # config file for idmappers in newer kernels
92   install -D -m 644 utils/nfsidmap/id_resolver.conf "$pkgdir"/etc/request-key.d/id_resolver.conf
94   mkdir "$pkgdir"/etc/exports.d
95   mkdir -m 555 "$pkgdir"/var/lib/nfs/rpc_pipefs
96   mkdir "$pkgdir"/var/lib/nfs/v4recovery
98   # systemd sysusers - FS#75536
99   install -D -m 644 ../sysusers.d "${pkgdir}"/usr/lib/sysusers.d/rpcuser.conf
100   chown -Rv 34:34 "${pkgdir}"/var/lib/nfs/statd
101   chmod -R 700 "${pkgdir}"/var/lib/nfs/statd
102   chmod 644 "${pkgdir}"/var/lib/nfs/statd/state
104   # nfsidmap cleanup
105   rm -vrf "$pkgdir"/usr/include #/nfsid*
106   rm -vrf "$pkgdir"/usr/lib/libnfsidmap*
107   rm -vrf "$pkgdir"/usr/lib/pkgconfig #/libnfsidmap.pc
108   rm -v "$pkgdir"/usr/share/man/{man3/nfs4_uid_to_name*,man5/idmapd.conf*}
109   rm -rf "$pkgdir"/usr/share/man/man3
112 package_nfsidmap() {
114   pkgdesc="Library to help mapping IDs, mainly for NFSv4"
115   license=('GPL2')
116   backup=(etc/idmapd.conf)
117   depends=('libldap' 'krb5')
119   cd "${pkgbase}"-${pkgver}
120   make -C support  DESTDIR="$pkgdir" install
121   # config file  
122   install -D -m 644 support/nfsidmap/idmapd.conf "$pkgdir"/etc/idmapd.conf
123   # license
124   install -Dm644 support/nfsidmap/COPYING $pkgdir/usr/share/licenses/nfsidmap/LICENSE