# 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="postgres mysql jdom" 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 jdom? ( dev-java/jdom ) postgres? ( dev-java/jdbc2-postgresql ) mysql? ( dev-java/jdbc-mysql )" RDEPEND="www-servers/tomcat" S=${WORKDIR}/${PN}.${PV} src_compile() { if use mysql && use postgres ; then echo ewarn "You have both \"mysql\" and \"postgres\" in your USE flags." ewarn "Open-Xchange will default to use PostgreSQL as its default" ewarn "Open-Xchange database." ewarn "If you want to build with MySQL support; hit Control-C now." ewarn "Set net-mail/openexchange -postgres in your package.use;" ewarn "or -postgres in your global USE." fi use mysql && my_configure="--with-dbdriver=org.mysql.Driver --with-jdbcjar=${ROOT}/usr/share/jdbc-mysql/lib/mysql-connector-java-3.0.11-stable-bin.jar" use postgres && my_configure="--with-dbdriver=org.postgresql.Driver --with-jdbcjar={$ROOT}/usr/share/jdbc2-postgresql-5/lib/pg73jdbc2.jar" use jdom && my_configure="--with-jdomjar=${ROOT}/usr/share/jdom/lib/jdom.jar" 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-xercesjar=${ROOT}/usr/share/xerces-2/lib/xercesImpl.jar \ --with-jsdkjar=${ROOT}/usr/share/servletapi-2.4/lib/servlet-api.jar \ --with-jni-dir=${ROOT}/opt/sun-jdk-1.4.2.05/include/jni.h \ --with-runuid=apache \ --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 }