]> git.draconx.ca Git - gentoo-draconx.git/blob - net-nds/ypbind/ypbind-1.38.ebuild
Add ebuilds for ypbind.
[gentoo-draconx.git] / net-nds / ypbind / ypbind-1.38.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="dbus nls slp systemd"
20
21 LIBDEPEND="slp? ( net-libs/openslp )
22         dbus? ( dev-libs/dbus-glib )
23         systemd? ( sys-apps/systemd:= )"
24 DEPEND="virtual/pkgconfig
25         <sys-libs/glibc-2.26
26         nls? ( sys-devel/gettext )
27         $LIBDEPEND"
28 RDEPEND="net-nds/yp-tools
29         net-nds/rpcbind
30         $LIBDEPEND"
31
32 PATCHES=("$FILESDIR/$P-fix-systemd-configuration.patch"
33         "$FILESDIR/$P-avoid-autopoint.patch"
34         "$FILESDIR/$P-flexible-bindingdir.patch")
35
36 S=$WORKDIR/$MY_P
37
38 src_prepare() {
39         default
40
41         eautoreconf
42 }
43
44 src_configure() {
45         local pidfile=${EPREFIX%/}/run/$PN.pid
46         local bindingdir=${EPREFIX%/}/var/yp/binding
47         local my_cppflags=("-D_YPBIND_PIDFILE=\\\"$pidfile\\\""
48                            "-DBINDINGDIR=\\\"$bindingdir\\\"")
49
50         sed -f - "$FILESDIR/ypbind.initd" >ypbind.initd <<EOF || die
51 /^prefix=/c\
52 prefix=${EPREFIX}
53 EOF
54
55         local myconf=($(use_enable nls) $(use_with systemd)
56                       $(use_enable dbus dbus-nm) $(use_enable slp))
57         econf CPPFLAGS="${my_cppflags[*]}" "${myconf[@]}"
58 }
59
60 src_install() {
61         default
62
63         dodoc etc/yp.conf
64         newinitd ypbind.initd ypbind
65 }