57 lines
1.4 KiB
Bash
57 lines
1.4 KiB
Bash
# Copyright 1999-2013 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Header: $
|
|
|
|
EAPI=5
|
|
|
|
inherit eutils prefix
|
|
MY_PV="${PV//_rc/-M}"
|
|
|
|
DESCRIPTION="LDAP and Kerberos server written in Java"
|
|
HOMEPAGE="http://directory.apache.org/apacheds/"
|
|
SRC_URI="mirror://apache/directory/apacheds/dist/${MY_PV}/${PN}-${MY_PV}.tar.gz"
|
|
|
|
LICENSE="Apache-2.0"
|
|
SLOT="0"
|
|
KEYWORDS="~x86 ~amd64"
|
|
IUSE=""
|
|
|
|
DEPEND=">=virtual/jre-1.6"
|
|
RDEPEND="${DEPEND}"
|
|
|
|
S=${WORKDIR}/${PN}-${MY_PV}
|
|
|
|
pkg_setup() {
|
|
enewgroup apacheds 288
|
|
enewuser apacheds 288 -1 /dev/null apacheds
|
|
}
|
|
|
|
src_install() {
|
|
insinto /usr/share/${PN}
|
|
doins lib/apache*.jar
|
|
|
|
keepdir "/var/lib/${PN}"
|
|
fowners apacheds:apacheds "/var/lib/${PN}"
|
|
fperms 750 "/var/lib/${PN}"
|
|
keepdir "/var/run/${PN}"
|
|
fowners apacheds:apacheds "/var/run/${PN}"
|
|
keepdir "/var/log/${PN}"
|
|
fowners apacheds:apacheds "/var/log/${PN}"
|
|
fperms 750 "/var/log/${PN}"
|
|
keepdir "/var/tmp/${PN}"
|
|
fowners apacheds:apacheds "/var/tmp/${PN}"
|
|
|
|
insinto "/var/run/${PN}/conf"
|
|
doins "${FILESDIR}"/log4j.properties
|
|
|
|
cp "${FILESDIR}"/apacheds{.conf,.init} "${T}" || die
|
|
eprefixify "${T}"/apacheds{.conf,.init}
|
|
sed -i -e "s|@SLOT@|${SLOT}|g" \
|
|
-e "s|@INSTANCE_USER@|apacheds|g" \
|
|
-e "s|@INSTANCE_GROUP@|apacheds|g" \
|
|
"${T}"/apacheds{.conf,.init} || die
|
|
|
|
newconfd "${T}"/apacheds.conf ${PN}
|
|
newinitd "${T}"/apacheds.init ${PN}
|
|
}
|