]> git.draconx.ca Git - gentoo-draconx.git/blob - net-nds/ypbind/ypbind-2.4.ebuild
Add ebuilds for ypbind.
[gentoo-draconx.git] / net-nds / ypbind / ypbind-2.4.ebuild
1 # Copyright © 2018 Nick Bowler
2 # License GPLv3+: GNU General Public License version 3 or later.
3 # There is NO WARRANTY, to the extent permitted by law.
4
5 EAPI=6
6
7 inherit autotools
8
9 MY_PN=ypbind-mt
10 MY_P=$MY_PN-$PV
11
12 DESCRIPTION="NIS binding service (ypbind-mt)"
13 HOMEPAGE="https://www.thkukuk.de/nis/nis/ypbind-mt/"
14 SRC_URI="http://www.thkukuk.de/nis/download/$MY_PN/$MY_P.tar.bz2"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="nls systemd"
20
21 LIBDEPEND=">=net-libs/libnsl-1:0=
22         net-libs/libtirpc:0=
23         systemd? ( sys-apps/systemd:= )"
24 DEPEND="virtual/pkgconfig
25         nls? ( sys-devel/gettext )
26         $LIBDEPEND"
27 RDEPEND="net-nds/yp-tools
28         net-nds/rpcbind
29         $LIBDEPEND"
30
31 PATCHES=("$FILESDIR/$P-fix-systemd-configuration.patch"
32         "$FILESDIR/$PN-1.38-avoid-autopoint.patch"
33         "$FILESDIR/$PN-1.38-flexible-bindingdir.patch")
34
35 S=$WORKDIR/$MY_P
36
37 src_prepare() {
38         default
39
40         eautoreconf
41 }
42
43 src_configure() {
44         local pidfile=${EPREFIX%/}/run/$PN.pid
45         local bindingdir=${EPREFIX%/}/var/yp/binding
46         local my_cppflags=("-D_YPBIND_PIDFILE=\\\"$pidfile\\\""
47                            "-DBINDINGDIR=\\\"$bindingdir\\\"")
48
49         sed -f - "$FILESDIR/ypbind.initd" >ypbind.initd <<EOF || die
50 /^prefix=/c\
51 prefix=${EPREFIX}
52 EOF
53
54         local myconf=($(use_enable nls) $(use_with systemd))
55         econf CPPFLAGS="${my_cppflags[*]}" "${myconf[@]}"
56 }
57
58 src_install() {
59         default
60
61         dodoc etc/yp.conf
62         newinitd ypbind.initd ypbind
63 }