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

59 lines
1.5 KiB
Bash
Raw Normal View History

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}
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}
}