gentoo/dev-java/ldapsdk/ldapsdk-4.22.0.ebuild

53 lines
1.2 KiB
Bash

# Copyright 1999-2020 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
JAVA_PKG_IUSE="doc source"
inherit java-pkg-2 java-ant-2
DESCRIPTION="Netscape Directory SDK for Java"
HOMEPAGE="http://www.mozilla.org/directory/javasdk.html"
SRC_URI="https://github.com/dogtagpki/ldap-sdk/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MPL-1.1"
SLOT="4.22"
KEYWORDS="~amd64 ~x86"
IUSE="doc"
RDEPEND=">=virtual/jre-1.8
dev-java/slf4j-api
>=dev-java/jss-4.6.0"
DEPEND=">=virtual/jdk-1.8
${RDEPEND}"
S=${WORKDIR}/ldap-sdk-${PV}/java-sdk
src_prepare() {
eapply "${FILESDIR}"/ldapsdk-gentoo.patch
echo "jss.lib=$(java-pkg_getjars jss-4.7)" >> "${S}"/build.properties || die
echo "slf4j.lib=$(java-pkg_getjars slf4j-api)" >> "${S}"/build.properties || die
cd "${S}"/ldapjdk/lib || die
rm -f *.jar || die
java-pkg_jar-from jss-4.7
cd "${S}"/ldapsp/lib || die
rm *.jar || die
default
}
src_compile() {
eant dist-jdk dist-filter dist-beans dist-jndi $(use_doc build-docs)
}
src_install() {
java-pkg_dojar dist/packages/*.jar
use doc && java-pkg_dojavadoc dist/doc/ldapsp
use source && \
java-pkg_dosrc {ldapsp,ldapjdk}/com {ldapjdk,ldapbeans,ldapfilter}/netscape
}