]> Pileus Git - ~andy/sunrise/blob - app-admin/ldapscripts/ldapscripts-1.4.ebuild
8f1acfe26f3f7242654e496e6d8883d60e13f6f1
[~andy/sunrise] / app-admin / ldapscripts / ldapscripts-1.4.ebuild
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils
6
7 DESCRIPTION="Shell scripts to manage POSIX accounts in an LDAP."
8 HOMEPAGE="http://contribs.martymac.com/"
9 SRC_URI="http://contribs.martymac.com/${PN}/${P}.tgz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~x86"
14 IUSE=""
15
16 DEPEND=""
17 RDEPEND="net-nds/openldap
18         dev-libs/uulib"
19
20 RUNTIMEDIR="/var/run/${PN}"
21 RUNTIMEFILE="runtime"
22 ETCDIR="/etc/${PN}"
23 ETCFILE="ldapscripts.conf"
24
25 src_unpack() {
26         unpack ${A}
27
28         # patch with fixes to problematic chown $HOME, add support to gecos
29         # specification. patches are sent upstream.
30         cd "${S}/bin"
31         epatch "${FILESDIR}/ldapadduser.patch"
32         cd "${S}/etc"
33         epatch "${FILESDIR}/ldapscripts.conf.patch"
34
35         # Prepare sources, as the install script would do it
36         cd "${S}"
37         sed -i.orig -e "s|^_RUNTIMEFILE=.*|_RUNTIMEFILE=\"${RUNTIMEDIR}/${RUNTIMEFILE}\"|g" bin/*
38         sed -i.orig -e "s|^_CONFIGFILE=.*|_CONFIGFILE=\"${ETCDIR}/${ETCFILE}\"|g" etc/*
39 }
40
41 src_install() {
42         dobin bin/*
43         doman man/man1/*
44
45         insinto ${RUNTIMEDIR}
46         doins etc/${RUNTIMEFILE}
47
48         insinto ${ETCDIR}
49         doins etc/${ETCFILE}
50
51         dodoc CHANGELOG README TODO VERSION
52 }