You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
1.7 KiB
83 lines
1.7 KiB
7 years ago
|
# Copyright 1999-2017 Gentoo Foundation
|
||
12 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
7 years ago
|
EAPI=6
|
||
12 years ago
|
|
||
7 years ago
|
# force single impl to avoid python-exec wrapping
|
||
|
DISTUTILS_SINGLE_IMPL=1
|
||
|
PYTHON_COMPAT=( python2_7 )
|
||
|
|
||
|
inherit distutils-r1 user
|
||
12 years ago
|
|
||
12 years ago
|
if [[ "${PV}" = "9999" ]]; then
|
||
12 years ago
|
inherit mercurial
|
||
12 years ago
|
EHG_REPO_URI="http://hg.opensource.lshift.net/mercurial-server"
|
||
|
KEYWORDS=""
|
||
|
else
|
||
|
MY_P="${PN}_${PV}"
|
||
|
SRC_URI="http://dev.lshift.net/paul/mercurial-server/${MY_P}.tar.gz"
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
|
S="${WORKDIR}/${MY_P}.orig"
|
||
|
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
|
||
7 years ago
|
python-single-r1_pkg_setup
|
||
12 years ago
|
}
|
||
|
|
||
7 years ago
|
python_prepare_all() {
|
||
12 years ago
|
# remove useless makefile
|
||
7 years ago
|
rm Makefile || die
|
||
12 years ago
|
|
||
|
# fix installation paths
|
||
|
sed -i -e "s|'init'|'share/${PN}/init'|" setup.py \
|
||
|
|| die 'sed setup.py failed.'
|
||
|
|
||
7 years ago
|
distutils-r1_python_prepare_all
|
||
12 years ago
|
}
|
||
|
|
||
7 years ago
|
python_compile_all() {
|
||
12 years ago
|
# build documentation
|
||
|
if use doc; then
|
||
|
xsltproc --nonet -o manual.html \
|
||
7 years ago
|
/usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl \
|
||
|
doc/manual.docbook || die "xsltproc failed"
|
||
12 years ago
|
fi
|
||
|
}
|
||
|
|
||
7 years ago
|
python_install() {
|
||
|
distutils-r1_python_install --install-scripts="/usr/share/${PN}"
|
||
|
}
|
||
|
|
||
|
python_install_all() {
|
||
|
distutils-r1_python_install_all
|
||
12 years ago
|
|
||
|
# install configuration files
|
||
|
insinto "/etc/${PN}"
|
||
7 years ago
|
doins -r src/init/conf/.
|
||
12 years ago
|
keepdir /etc/mercurial-server/keys/{root,users}
|
||
|
|
||
|
# install documentation
|
||
7 years ago
|
use doc && dodoc manual.html
|
||
12 years ago
|
|
||
|
# install hg home directory
|
||
|
keepdir "/var/lib/${PN}"
|
||
|
fowners hg:hg "/var/lib/${PN}"
|
||
|
fperms 750 "/var/lib/${PN}"
|
||
|
}
|