alpha-quadrant/net-nds/apacheds/apacheds-2.0.0_rc15.ebuild

57 lines
1.4 KiB
Bash
Raw Normal View History

2013-09-26 16:17:38 +02:00
# 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() {
2013-10-21 08:33:54 +02:00
insinto /usr/share/${PN}
doins lib/apache*.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/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}"
2013-10-21 08:33:54 +02:00
insinto "/var/run/${PN}/conf"
doins "${FILESDIR}"/log4j.properties
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}
}