summaryrefslogtreecommitdiff
blob: 9b647f43c294eb5bb5b3ea00ac324cf5ebb54c5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-nds/ypserv/ypserv-1.3.12.ebuild,v 1.10 2002/10/05 05:39:24 drobbins Exp $

IUSE="tcpd"

S=${WORKDIR}/${P}
DESCRIPTION="NIS SERVER"
SRC_URI="ftp://ftp.de.kernel.org/pub/linux/utils/net/NIS/${P}.tar.gz
	 ftp://ftp.uk.kernel.org/pub/linux/utils/net/NIS/${P}.tar.gz
	 ftp://ftp.kernel.org/pub/linux/utils/net/NIS/${P}.tar.gz"
HOMEPAGE="http://www.linux-nis.org/nis/"

SLOT="1"
LICENSE="GPL-2"
KEYWORDS="x86 sparc sparc64"

DEPEND=">=sys-libs/gdbm-1.8.0
	tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"

src_unpack() {

	unpack ${A}
	cd ${S}
	cp ${FILESDIR}/defs.sed ypmake
	patch < ${FILESDIR}/${PV}/volatile-fix-gcc-3.2.diff || die

}

src_compile() {

	local myconf
	use tcpd && myconf="${myconf} --enable-tcp-wrapper"

	./configure \
		--host=${CHOST} \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--mandir=/usr/share/man \
		--enable-yppasswd \
		${myconf} || die

	make || die

	cd ${S}/ypmake
	sed -f defs.sed Makefile.in > Makefile
	make || die
}

src_install() {

	make \
		ROOT=${D} \
		installdirs install_progs || die

	exeinto /usr/sbin
	cd ${S}/contrib ; doexe ypslave
	cd ${S}/ypmake ; doexe ypmake

	insinto /usr/lib/yp/ypmake
	for i in aliases arrays automount config ethers group gshadow hosts \
		netgroup netid networks passwd protocols publickey \
		rpc services shadow ypservers
	do
		doins $i
	done

	insinto /var/yp
	doins ypmake.conf.sample

	newman ypmake.man ypmake.8
	newman ypmake.conf.man ypmake.conf.5

	cd ${S}
	dodoc BUGS ChangeLog HOWTO.SuSE NEWS TODO

	insinto /etc ; doins etc/ypserv.conf

	exeinto /etc/init.d
	newexe ${FILESDIR}/ypserv.rc6 ypserv
}