# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils webapp DESCRIPTION="A web-based bug and patch-set tracking system for SVN based on CVSTrac." HOMEPAGE="http://www.cvstrac.org/" SRC_URI="http://www.cvstrac.org/cvstrac-${PV}.tar.gz" LICENSE="GPL-2" KEYWORDS="x86 ~ppc ~sparc ~amd64" IUSE="vhosts" DEPEND="app-text/rcs dev-util/cvs dev-util/subversion =dev-db/sqlite-2.8*" DOCS="COMPILING COPYING VERSION" CVSTRAC_S="${WORKDIR}/cvstrac-${PV}" src_unpack() { unpack ${A} mkdir ${CVSTRAC_S}/obj ln -s ${CVSTRAC_S}/linux-gcc.mk ${CVSTRAC_S}/obj/Makefile sed -i -e "s#/home/drh/cvstrac/cvstrac#${CVSTRAC_S}#" ${CVSTRAC_S}/obj/Makefile } src_compile() { cd ${CVSTRAC_S}/obj make || die "emake failed" make APPNAME=svntrac all } src_install() { cd ${CVSTRAC_S} dobin obj/${PN} webapp_src_preinst dodoc ${DOCS} dohtml howitworks.html echo "#!/bin/sh" > ${D}/${MY_CGIBINDIR}/svntrac.cgi || die echo "svntrac cgi /var/lib/svntrac" >> ${D}/${MY_CGIBINDIR}/svntrac.cgi || die chmod +x ${D}/${MY_CGIBINDIR}/svntrac.cgi insinto ${MY_HTDOCSDIR} doins *.gif obj/index.html keepdir /var/lib/svntrac webapp_serverowned ${MY_HTDOCSDIR} webapp_src_install } pkg_postinst() { einfo "To initialize a new SVNTrac database, type the following command" einfo "(must be a user other than root to initialize):" einfo "" einfo " svntrac init /var/lib/svntrac demo" einfo "" einfo "Start the server:" einfo "" einfo " svntrac server 8080 /var/lib/svntrac demo" einfo "" einfo "Open a browser and point to http://host:8080/svntrac.cgi/demo/" einfo "with user setup and password setup to continue." einfo "" einfo "Please visit the SVNTrac install guide for further details:" einfo "http://www.cvstrac.org/cvstrac/wiki?p=SvnTrac" }