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