2cca142219d5c9b662fa01d56b69a6dfdbfb2996
[gentoo.git] / app-admin / webapp-config / webapp-config-1.52-r1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit distutils-r1
9
10 SRC_URI="https://dev.gentoo.org/~twitch153/${PN}/${P}.tar.bz2"
11 KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
12
13 DESCRIPTION="Gentoo's installer for web-based applications"
14 HOMEPAGE="https://sourceforge.net/projects/webapp-config/"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 IUSE="+portage"
19
20 DEPEND="app-text/xmlto
21         !dev-python/configparser"
22 RDEPEND="portage? ( sys-apps/portage[${PYTHON_USEDEP}] )"
23
24 python_prepare() {
25         epatch "${FILESDIR}/${P}-nulls-doctest.patch"
26 }
27
28 python_compile_all() {
29         emake -C doc/
30 }
31
32 python_install() {
33         # According to this discussion:
34         # http://mail.python.org/pipermail/distutils-sig/2004-February/003713.html
35         # distutils does not provide for specifying two different script install
36         # locations. Since we only install one script here the following should
37         # be ok
38         distutils-r1_python_install --install-scripts="/usr/sbin"
39 }
40
41 python_install_all() {
42         distutils-r1_python_install_all
43
44         insinto /etc/vhosts
45         doins config/webapp-config
46
47         keepdir /usr/share/webapps
48         keepdir /var/db/webapps
49
50         dodoc AUTHORS
51         doman doc/*.[58]
52         dohtml doc/*.[58].html
53 }
54
55 python_test() {
56         PYTHONPATH="." "${PYTHON}" WebappConfig/tests/dtest.py \
57                 || die "Testing failed with ${EPYTHON}"
58 }
59
60 pkg_postinst() {
61         elog "Now that you have upgraded webapp-config, you **must** update your"
62         elog "config files in /etc/vhosts/webapp-config before you emerge any"
63         elog "packages that use webapp-config."
64 }