2014-03-24 11:19:15 +01:00
|
|
|
# Copyright 1999-2014 Gentoo Foundation
|
2013-09-26 16:17:38 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
2014-03-24 11:19:15 +01:00
|
|
|
EAPI=4
|
2013-09-26 16:17:38 +02:00
|
|
|
|
2014-03-24 11:19:15 +01:00
|
|
|
inherit eutils prefix user
|
2013-09-26 16:17:38 +02:00
|
|
|
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() {
|
2014-03-24 11:19:15 +01:00
|
|
|
ebegin "Creating apacheds user and group"
|
|
|
|
enewgroup ${PN}
|
|
|
|
enewuser ${PN} -1 -1 -1 ${PN}
|
|
|
|
eend $?
|
2013-09-26 16:17:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2013-10-21 08:33:54 +02:00
|
|
|
insinto /usr/share/${PN}
|
2014-06-03 12:12:33 +02:00
|
|
|
doins lib/apacheds*.jar
|
2013-09-26 16:17:38 +02:00
|
|
|
|
|
|
|
keepdir "/var/lib/${PN}"
|
|
|
|
fowners apacheds:apacheds "/var/lib/${PN}"
|
|
|
|
fperms 750 "/var/lib/${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}"
|
|
|
|
|
2014-06-03 12:12:33 +02:00
|
|
|
insinto "/etc/default/${PN}"
|
|
|
|
cp instances/default/conf/* ${T}
|
|
|
|
sed -i -e "s|\(layout\.ConversionPattern=\).*$|\1%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n|g" \
|
|
|
|
"${T}/log4j.properties"
|
|
|
|
doins "${T}"/log4j.properties "${T}"/config.ldif
|
2013-09-26 16:17:38 +02:00
|
|
|
|
2013-10-21 08:33:54 +02:00
|
|
|
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}
|
2013-09-26 16:17:38 +02:00
|
|
|
newinitd "${T}"/apacheds.init ${PN}
|
|
|
|
}
|