summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Martins <rafaelmartins@gentoo.org>2011-01-13 20:22:42 +0000
committerRafael Martins <rafaelmartins@gentoo.org>2011-01-13 20:22:42 +0000
commitbd2e7e226de6193837af7e6a097b19a48b603e43 (patch)
treeab37c0f63c2b7ab5ae192883b5325b8d14d8fb00 /dev-vcs/mercurial-server/mercurial-server-1.1.ebuild
parentPython patches included from today (diff)
downloadhistorical-bd2e7e226de6193837af7e6a097b19a48b603e43.tar.gz
historical-bd2e7e226de6193837af7e6a097b19a48b603e43.tar.bz2
historical-bd2e7e226de6193837af7e6a097b19a48b603e43.zip
Initial commit.
Package-Manager: portage-2.2.0_alpha14/cvs/Linux x86_64
Diffstat (limited to 'dev-vcs/mercurial-server/mercurial-server-1.1.ebuild')
-rw-r--r--dev-vcs/mercurial-server/mercurial-server-1.1.ebuild83
1 files changed, 83 insertions, 0 deletions
diff --git a/dev-vcs/mercurial-server/mercurial-server-1.1.ebuild b/dev-vcs/mercurial-server/mercurial-server-1.1.ebuild
new file mode 100644
index 000000000000..ea34394002d9
--- /dev/null
+++ b/dev-vcs/mercurial-server/mercurial-server-1.1.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial-server/mercurial-server-1.1.ebuild,v 1.1 2011/01/13 20:22:42 rafaelmartins Exp $
+
+EAPI="3"
+PYTHON_DEPEND="2"
+
+if [[ "${PV}" = "9999" ]]; then
+ EHG_REVISION="default"
+ inherit distutils eutils mercurial
+ EHG_REPO_URI="http://hg.opensource.lshift.net/mercurial-server"
+ KEYWORDS=""
+ S="${WORKDIR}/${PN}"
+else
+ inherit distutils eutils
+ MY_P="${PN}_${PV}"
+ SRC_URI="http://dev.lshift.net/paul/mercurial-server/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="Mercurial authentication and authorization tools"
+HOMEPAGE="http://www.lshift.net/mercurial-server.html"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="doc"
+
+RDEPEND="dev-vcs/mercurial"
+DEPEND="${RDEPEND}
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ )"
+
+pkg_setup() {
+ enewgroup hg
+ enewuser hg -1 /bin/bash "/var/lib/${PN}" hg
+}
+
+src_prepare() {
+ # remove useless makefile
+ rm Makefile
+
+ # fix installation paths
+ sed -i -e "s|'init'|'share/${PN}/init'|" setup.py \
+ || die 'sed setup.py failed.'
+
+ # fix documentation
+ if [[ "${PV}" = "1.1" ]]; then
+ epatch "${FILESDIR}/${P}_documentation.patch"
+ fi
+}
+
+src_compile() {
+ distutils_src_compile
+
+ # build documentation
+ if use doc; then
+ xsltproc --nonet -o manual.html \
+ /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl \
+ doc/manual.docbook || die "xsltproc failed"
+ fi
+}
+
+src_install() {
+ distutils_src_install --install-scripts="/usr/share/${PN}"
+
+ # install configuration files
+ insinto "/etc/${PN}"
+ doins -r src/init/conf/*
+ keepdir /etc/mercurial-server/keys/{root,users}
+
+ # install documentation
+ if use doc; then
+ dohtml manual.html
+ fi
+
+ # install hg home directory
+ keepdir "/var/lib/${PN}"
+ fowners hg:hg "/var/lib/${PN}"
+ fperms 750 "/var/lib/${PN}"
+}