# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils rpm webapp depend.php versionator MY_P="rscds-${PV}-2.noarch" DESCRIPTION="A CalDAV and iCal server" HOMEPAGE="http://rscds.sourceforge.net/" SRC_URI="http://downloads.sourceforge.net/rscds/${MY_P}.rpm" LICENSE="GPL-1" KEYWORDS="-* ~x86 ~amd64" IUSE="vhosts" DEPEND="www-servers/apache dev-lang/php dev-db/postgresql app-admin/pwgen app-arch/rpm2targz net-libs/libawl-php" RDEPEND="${DEPEND}" S="${WORKDIR}" need_php pkg_setup() { webapp_pkg_setup if ! PHPCHECKNODIE="yes" require_php_with_use postgres; then eerror eerror "${PHP_PKG} needs to be re-installed with all of the following" eerror "USE flags enabled:" eerror eerror "postgres" eerror die "Re-install ${PHP_PKG}" fi if ! PHPCHECKNODIE="yes" require_php_with_use ldap; then ewarn ewarn "${PHP_PKG} needs to be re-installed with ldap if you want" ewarn "LDAP support" ewarn fi } src_unpack() { rpm_src_unpack } src_install() { webapp_src_preinst cd "${S}/usr/share/doc/${PN}/" local docs="INSTALL README README.Debian README.regression_tests \ TODO changelog copyright" dodoc ${docs} || die "dodoc failed" dohtml -r "${S}/usr/share/doc/${PN}/website/" || die "dohtml failed" dohtml -r "${S}/usr/share/doc/${PN}/api/" || die "dohtml failed" cd "${S}/usr/share/${PN}" local dirs="htdocs inc locale" cp -pPR ${dirs} "${D}/${MY_HTDOCSDIR}" || die "failed to copy htdocs" cp -pPR ${S}/usr/share/${PN}/dba/* "${D}/${MY_SQLSCRIPTSDIR}" || \ die "failed to copy dba" insinto /etc/rscds/ newins "${FILESDIR}/rscds.conf" calendar.example.com-conf.php || \ die "failed to copy config" webapp_postinst_txt en "${FILESDIR}"/postinstall-en-${PV}.txt webapp_src_install }