/[gentoo-x86]/net-fs/nfs-utils/nfs-utils-1.2.6.ebuild
Gentoo

Contents of /net-fs/nfs-utils/nfs-utils-1.2.6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.16 - (show annotations) (download)
Sat Apr 13 20:02:02 2013 UTC (6 weeks ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.15: +3 -2 lines
Force sqlite test to work even when cross-compiling #465576 by Dennis Schridde.

(Portage version: 2.2.0_alpha170/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/nfs-utils-1.2.6.ebuild,v 1.15 2013/03/24 21:44:02 vapier Exp $
4
5 EAPI="4"
6
7 inherit eutils flag-o-matic multilib autotools
8
9 DESCRIPTION="NFS client and server daemons"
10 HOMEPAGE="http://linux-nfs.org/"
11 SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
16 IUSE="caps ipv6 kerberos nfsdcld nfsidmap +nfsv4 nfsv41 selinux tcpd"
17 RESTRICT="test" #315573
18
19 # kth-krb doesn't provide the right include
20 # files, and nfs-utils doesn't build against heimdal either,
21 # so don't depend on virtual/krb.
22 # (04 Feb 2005 agriffis)
23 DEPEND_COMMON="tcpd? ( sys-apps/tcp-wrappers )
24 caps? ( sys-libs/libcap )
25 sys-libs/e2fsprogs-libs
26 net-nds/rpcbind
27 net-libs/libtirpc
28 nfsdcld? ( >=dev-db/sqlite-3.3 )
29 nfsv4? (
30 >=dev-libs/libevent-1.0b
31 >=net-libs/libnfsidmap-0.21-r1
32 kerberos? (
33 net-libs/librpcsecgss
34 >=net-libs/libgssglue-0.3
35 net-libs/libtirpc[kerberos]
36 app-crypt/mit-krb5
37 )
38 nfsidmap? (
39 >=net-libs/libnfsidmap-0.24
40 sys-apps/keyutils
41 )
42 )
43 nfsv41? (
44 sys-fs/lvm2
45 )
46 selinux? (
47 sec-policy/selinux-rpc
48 sec-policy/selinux-rpcbind
49 )"
50 RDEPEND="${DEPEND_COMMON} !net-nds/portmap"
51 # util-linux dep is to prevent man-page collision
52 DEPEND="${DEPEND_COMMON}
53 virtual/pkgconfig
54 !<sys-apps/util-linux-2.12r-r7"
55
56 src_prepare() {
57 epatch "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
58 epatch "${FILESDIR}"/${PN}-1.2.6-cross-build.patch
59 epatch "${FILESDIR}"/${PN}-1.2.6-osd-install.patch
60 epatch "${FILESDIR}"/${PN}-1.2.6-conditionals.patch
61 epatch "${FILESDIR}"/${PN}-1.2.7-nfsiostat-python3.patch #458934
62 epatch "${FILESDIR}"/${PN}-1.2.7-libio.patch #459200
63 eautoreconf
64 }
65
66 src_configure() {
67 export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
68 export ac_cv_header_keyutils_h=$(usex nfsidmap)
69 econf \
70 --with-statedir=/var/lib/nfs \
71 --enable-tirpc \
72 $(use_with tcpd tcp-wrappers) \
73 $(use_enable nfsdcld) \
74 $(use_enable nfsv4) \
75 $(use_enable nfsv41) \
76 $(use_enable ipv6) \
77 $(use_enable caps) \
78 $(use nfsv4 && use_enable kerberos gss || echo "--disable-gss")
79 }
80
81 src_install() {
82 default
83 rm linux-nfs/Makefile* || die
84 dodoc -r linux-nfs ChangeLog README
85
86 # Don't overwrite existing xtab/etab, install the original
87 # versions somewhere safe... more info in pkg_postinst
88 keepdir /var/lib/nfs/{,sm,sm.bak}
89 mv "${ED}"/var/lib "${ED}"/usr/$(get_libdir) || die
90
91 # Install some client-side binaries in /sbin
92 dodir /sbin
93 mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die
94
95 if use nfsidmap ; then
96 # Install a config file for idmappers in newer kernels. #415625
97 insinto /etc/request-key.d
98 echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
99 doins id_resolver.conf
100 fi
101
102 insinto /etc
103 doins "${FILESDIR}"/exports
104
105 local f list="" opt_need=""
106 if use nfsv4 ; then
107 opt_need="rpc.idmapd"
108 list="${list} rpc.idmapd rpc.pipefs"
109 use kerberos && list="${list} rpc.gssd rpc.svcgssd"
110 fi
111 for f in nfs nfsmount rpc.statd ${list} ; do
112 newinitd "${FILESDIR}"/${f}.initd ${f}
113 done
114 for f in nfs nfsmount ; do
115 newconfd "${FILESDIR}"/${f}.confd ${f}
116 done
117 sed -i \
118 -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
119 "${ED}"/etc/conf.d/nfs || die #234132
120 }
121
122 pkg_postinst() {
123 # Install default xtab and friends if there's none existing. In
124 # src_install we put them in /usr/lib/nfs for safe-keeping, but
125 # the daemons actually use the files in /var/lib/nfs. #30486
126 local f
127 mkdir -p "${ROOT}"/var/lib/nfs #368505
128 for f in "${ROOT}"/usr/$(get_libdir)/nfs/*; do
129 [[ -e ${ROOT}/var/lib/nfs/${f##*/} ]] && continue
130 einfo "Copying default ${f##*/} from /usr/$(get_libdir)/nfs to /var/lib/nfs"
131 cp -pPR "${f}" "${ROOT}"/var/lib/nfs/
132 done
133 }

  ViewVC Help
Powered by ViewVC 1.1.20