summaryrefslogtreecommitdiff
blob: 797c490764aa3e5a507d90540100788b4f6b606b (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="Shell scripts to manage POSIX accounts in an LDAP."
HOMEPAGE="http://contribs.martymac.com/"
SRC_URI="http://contribs.martymac.com/${PN}/${P}.tgz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

DEPEND=""
RDEPEND="net-nds/openldap
	dev-libs/uulib"

RUNTIMEDIR="/var/run/${PN}"
RUNTIMEFILE="runtime"
ETCDIR="/etc/${PN}"
ETCFILE="ldapscripts.conf"

src_unpack() {
	unpack ${A}

	# Prepare sources, as the install script would do it
	cd "${S}"
	sed -i.orig -e "s|^_RUNTIMEFILE=.*|_RUNTIMEFILE=\"${RUNTIMEDIR}/${RUNTIMEFILE}\"|g" bin/*
	sed -i.orig -e "s|^_CONFIGFILE=.*|_CONFIGFILE=\"${ETCDIR}/${ETCFILE}\"|g" etc/*
}

src_install() {
	dobin bin/*
	doman man/man1/*

	insinto "${RUNTIMEDIR}"
	doins "etc/${RUNTIMEFILE}"

	insinto "${ETCDIR}"
	doins "etc/${ETCFILE}"

	dodoc CHANGELOG README TODO VERSION
}