# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # this ebuild is half-functioning # read INSTALL.verbose, or else inherit webapp DESCRIPTION="Savane is a Web-based Libre Software hosting system (continuation of Savannah)" HOMEPAGE="https://gna.org/projects/savane" KEYWORDS="~x86" IUSE="" S=${WORKDIR}/${PN} SRC_URI="http://download.gna.org/${PN}/${P}.tar.gz" DEPEND="net-www/apache virtual/php >=dev-db/mysql-3.23" LICENSE="GPL-2" src_unpack() { unpack ${A} cd ${S} #patch the configure script VENDORLIB=`perl '-V:installvendorlib' |cut -d= -f2 | cut -d"'" -f2` sed -i "s|\$SV_DIR=\`pwd\`|SV_DIR=\`pwd\`| s|\[\/usr\/local\/bin\]:|\[\/usr\/bin\]:| s|SV_BIN=\/usr\/local\/bin|SV_BIN=\/usr\/bin| s|\/usr\/local\/lib\/site_perl|${VENDORLIB}|g " configure } pkg_setup() { webapp_pkg_setup ewarn "Savane needs a PHP interpreter with gettext and mysql support" ewarn "If you did not emerge PHP with USE=\"nls mysql\", you will need to reemerge it" } src_compile() { cd ${S} einfo "Answer several questions to configure your Savane installation" einfo "It is recommended that you choose the default values" einfo "In question #2, be sure to specify your URL prefix." einfo "If you do not have USE=vhosts, it should be set to /savane" sleep 7 econf || die "Configure failed" emake || die "make failed" make database # patch the makefile sed -i "s|WWW_SERVER_USER=|WWW_SERVER_USER=apache| s|SV_CONF=|SV_CONF=${D}\/| s|SV_BIN=|SV_BIN=${D}\/| s|PERL_INC=|PERL_INC=${D}\/| s|INSTALLNLSDIR=|INSTALLNLSDIR=${D}\/| " Makefile backend/Makefile lib/Makefile po/Makefile } src_install() { webapp_src_preinst dodir /etc/savannah make conf dodir /usr/bin einstall || die "make install failed" # install only one theme---i got tired of waiting for everything to install dodir ${MY_HTDOCSDIR}/frontend/php/images/savannah.theme cd ${S}/frontend/php/images/savannah.theme cp -R . ${D}/${MY_HTDOCSDIR}/frontend/php/images/savannah.theme cd ${S} rm -rf frontend/php/images cd ${S}/frontend/php cp -R . ${D}/${MY_HTDOCSDIR}/frontend/php dosed /etc/savannah/savannah.conf.php webapp_src_install }