# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit java-pkg DESCRIPTION="Netline OpenExhcnage groupware server" HOMEPAGE="http://mirror.open-xchange.org" SRC_URI="http://mirror.open-xchange.org/download/janus/open-xchange-${PV}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="postgresql mysql" DEPEND="dev-perl/Net-SSLeay dev-perl/IO-Socket-SSL dev-perl/XML-NamespaceSupport dev-perl/XML-SAX-Base dev-perl/Authen-SASL dev-perl/Convert-ASN1 dev-perl/perl-ldap dev-java/sun-javamail-bin dev-java/sun-jaf-bin dev-java/xerces dev-java/servletapi >=virtual/jdk-1.4 postgresql? ( dev-java/jdbc2-postgresql ) mysql? ( dev-java/jdbc-mysql )" RDEPEND="www-servers/tomcat" S=${WORKDIR}/${PN}.${PV} src_compile() { if use mysql && use postgresql ; then echo ewarn "You have both \"mysql\" and \"postgresql\" in your USE flags." ewarn "Will default to use mysql for OpenExchange database." ewarn "If you want to build with PostgreSQL support; hit Control-C now." ewarn "Set net-mail/openexchange -mysql in your package.use;" ewarn "or -mysql in your global USE." fi use postgresql && my_configure="--with-dbdriver=org.postgresql.Driver" use mysql && my_configure="--with-dbdriver=org.mysql.Driver" cd ${S} chmod +x ${S}/missing econf \ --with-mailjar=${ROOT}/usr/share/sun-javamail-bin/lib/mail.jar \ --with-activationjar=${ROOT}/usr/share/sun-jaf-bin/lib/activation.jar \ --with-jdomjar=${ROOT}/usr/share/jdom/lib/jdom.jar \ --with-xercesjar=${ROOT}/usr/share/xerces-2/lib/xercesImpl.jar \ --with-jsdkjar=${ROOT}/usr/share/servletapi-2.4/lib/servlet-api.jar \ --with-jdbcjar=${ROOT}/usr/share/jdbc-mysql/lib/mysql-connector-java-3.0.11-stable-bin.jar \ --with-jni-dir=${ROOT}/opt/blackdown-jdk-1.4.2_rc1/include/jni.h \ --includedir=${ROOT}/usr/include --enable-webdav \ --enable-ssl \ $my_configure \ || die emake || die if use doc ; then emake javadoc || die fi } src_install_FOO() { einstall || die rm ${D}/usr/share/*.jar java-pkg_dojar source/gnu-crypto.jar java-pkg_dojar jce/javax-crypto.jar java-pkg_dojar security/javax-security.jar if use doc ; then dohtml -r api/* fi dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS }