aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-vcs/mercurial-server/mercurial-server-1.0.1.ebuild')
-rw-r--r--dev-vcs/mercurial-server/mercurial-server-1.0.1.ebuild34
1 files changed, 17 insertions, 17 deletions
diff --git a/dev-vcs/mercurial-server/mercurial-server-1.0.1.ebuild b/dev-vcs/mercurial-server/mercurial-server-1.0.1.ebuild
index 93e4ef8ef..fa4b18f45 100644
--- a/dev-vcs/mercurial-server/mercurial-server-1.0.1.ebuild
+++ b/dev-vcs/mercurial-server/mercurial-server-1.0.1.ebuild
@@ -2,9 +2,11 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-EAPI="2"
+EAPI="3"
-inherit eutils
+PYTHON_DEPEND="2"
+
+inherit eutils python
DESCRIPTION="Mercurial authentication and authorization tools"
HOMEPAGE="http://www.lshift.net/mercurial-server.html"
@@ -15,41 +17,39 @@ SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""
-DEPEND="dev-vcs/mercurial
- dev-lang/python
+RDEPEND="dev-vcs/mercurial"
+DEPEND="${RDEPEND}
app-text/docbook-xsl-stylesheets
dev-libs/libxslt"
-RDEPEND="dev-vcs/mercurial
- dev-lang/python"
-
S="${WORKDIR}/${PN}_${PV}.orig"
pkg_setup() {
enewgroup hg
enewuser hg -1 /bin/sh /home/hg hg
chmod 700 /home/hg
+ python_set_active_version 2
}
src_compile() {
- emake DOCBOOK_XSL=/usr/share/sgml/docbook/xsl-stylesheets || die "emake failed"
+ emake DOCBOOK_XSL="${EPREFIX}"/usr/share/sgml/docbook/xsl-stylesheets || die "emake failed"
}
src_install() {
- emake installfiles PREFIX=/usr/share DOCDIR="/usr/share/doc/${PF}" DESTDIR="${D}"
+ emake installfiles PREFIX="${EPREFIX}"/usr/share DOCDIR="${EPREFIX}/usr/share/doc/${PF}" DESTDIR="${D}" || die
}
pkg_postinst() {
#skip the comments if there is already a hgadmin repo
- if [ ! -d /home/hg/repos/hgadmin/.hg ]; then
- #Parts could be done automatically, but maybe there is a user hg
+ if [ ! -d "${EPREFIX}"/home/hg/repos/hgadmin/.hg ]; then
+ #Parts could be done automatically, but maybe there is a user hg
elog "This seem to be a first time install, things you may want to do"
elog "-Add your public ssh key to root key folder"
- elog " sudo cp ~/.ssh/id_rsa.pub ${ROOT}etc/mercurial-server/keys/root/\${USER}"
+ elog " sudo cp ~/.ssh/id_rsa.pub ${EROOT}etc/mercurial-server/keys/root/\${USER}"
elog "-Create hgadmin repo"
- elog " sudo -H -u hg ${ROOT}usr/share/mercurial-server/init/hginit ${ROOT}usr/share/mercurial-server"
+ elog " sudo -H -u hg ${EROOT}usr/share/mercurial-server/init/hginit ${EROOT}usr/share/mercurial-server"
elog "-Init hg's ssh authorized_keys file"
- elog " sudo -H -u hg ${ROOT}usr/share/mercurial-server/refresh-auth"
+ elog " sudo -H -u hg ${EROOT}usr/share/mercurial-server/refresh-auth"
elog "-Clone hgadmin repo"
elog " hg clone ssh://hg@localhost/hgadmin hgadmin"
elog "-Start administration"
@@ -60,10 +60,10 @@ pkg_postinst() {
elog " hg add"
elog " hg commit -m 'initial commit'"
elog " hg push ssh://hg@localhost/hgadmin"
- elog "-Remove the key in ${ROOT}etc/mercurial-server/keys/root"
- elog " rm ${ROOT}etc/mercurial-server/keys/root/\${USER}"
+ elog "-Remove the key in ${EROOT}etc/mercurial-server/keys/root"
+ elog " rm ${EROOT}etc/mercurial-server/keys/root/\${USER}"
fi
ewarn "If you are upgrading from an older version of ${PN}, please take a look at"
- ewarn "${ROOT}usr/share/mercurial-server/init/dot-mercurial-server"
+ ewarn "${EROOT}usr/share/mercurial-server/init/dot-mercurial-server"
ewarn "and add missing lines to ~hg/.mercurial-server"
}