]> git.draconx.ca Git - gentoo-draconx.git/blobdiff - net-nds/ypbind/ypbind-2.4.ebuild
Add ebuilds for ypbind.
[gentoo-draconx.git] / net-nds / ypbind / ypbind-2.4.ebuild
diff --git a/net-nds/ypbind/ypbind-2.4.ebuild b/net-nds/ypbind/ypbind-2.4.ebuild
new file mode 100644 (file)
index 0000000..bc5f7c8
--- /dev/null
@@ -0,0 +1,63 @@
+# Copyright © 2018 Nick Bowler
+# License GPLv3+: GNU General Public License version 3 or later.
+# There is NO WARRANTY, to the extent permitted by law.
+
+EAPI=6
+
+inherit autotools
+
+MY_PN=ypbind-mt
+MY_P=$MY_PN-$PV
+
+DESCRIPTION="NIS binding service (ypbind-mt)"
+HOMEPAGE="https://www.thkukuk.de/nis/nis/ypbind-mt/"
+SRC_URI="http://www.thkukuk.de/nis/download/$MY_PN/$MY_P.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="nls systemd"
+
+LIBDEPEND=">=net-libs/libnsl-1:0=
+       net-libs/libtirpc:0=
+       systemd? ( sys-apps/systemd:= )"
+DEPEND="virtual/pkgconfig
+       nls? ( sys-devel/gettext )
+       $LIBDEPEND"
+RDEPEND="net-nds/yp-tools
+       net-nds/rpcbind
+       $LIBDEPEND"
+
+PATCHES=("$FILESDIR/$P-fix-systemd-configuration.patch"
+       "$FILESDIR/$PN-1.38-avoid-autopoint.patch"
+       "$FILESDIR/$PN-1.38-flexible-bindingdir.patch")
+
+S=$WORKDIR/$MY_P
+
+src_prepare() {
+       default
+
+       eautoreconf
+}
+
+src_configure() {
+       local pidfile=${EPREFIX%/}/run/$PN.pid
+       local bindingdir=${EPREFIX%/}/var/yp/binding
+       local my_cppflags=("-D_YPBIND_PIDFILE=\\\"$pidfile\\\""
+                          "-DBINDINGDIR=\\\"$bindingdir\\\"")
+
+       sed -f - "$FILESDIR/ypbind.initd" >ypbind.initd <<EOF || die
+/^prefix=/c\
+prefix=${EPREFIX}
+EOF
+
+       local myconf=($(use_enable nls) $(use_with systemd))
+       econf CPPFLAGS="${my_cppflags[*]}" "${myconf[@]}"
+}
+
+src_install() {
+       default
+
+       dodoc etc/yp.conf
+       newinitd ypbind.initd ypbind
+}