*/*: Reassign packages from hwoarang
[gentoo.git] / app-emulation / phpvirtualbox / phpvirtualbox-4.3.0.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 inherit versionator eutils webapp readme.gentoo
7
8 MY_PV="$(replace_version_separator 2 '-')"
9 MY_P="${PN}-${MY_PV}"
10
11 DESCRIPTION="Web-based administration for VirtualBox in PHP"
12 HOMEPAGE="https://sourceforge.net/projects/phpvirtualbox/"
13 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
14
15 LICENSE="GPL-2"
16 KEYWORDS="~amd64 ~x86"
17 IUSE=""
18
19 RDEPEND="
20         dev-lang/php[session,unicode,soap,gd]
21         virtual/httpd-php:*
22 "
23 DEPEND="app-arch/unzip"
24
25 S="${WORKDIR}"
26
27 DISABLE_AUTOFORMATTING="yes"
28 DOC_CONTENTS="
29 Local or remote virtualbox hosts must be compiled with
30 'vboxwebsrv' useflag and the respective init script
31 must be running to use this interface:
32 /etc/init.d/vboxwebsrv start
33
34 To enable the automatic startup mode feature uncomment the
35 following line in the config.php file:
36 var \$startStopConfig = true;
37
38 You should also add the /etc/init.d/vboxinit script to the
39 default runlevel on the virtualbox host:
40 \`rc-update add vboxinit default\`
41 If the server is on a remote host, than the script must be
42 copied manually from
43 '${FILESDIR}'/vboxinit-initd to
44 /etc/init.d/vboxinit on the remote host."
45
46 src_install() {
47         webapp_src_preinst
48
49         dodoc CHANGELOG.txt LICENSE.txt README.txt
50         rm -f CHANGELOG.txt LICENSE.txt README.txt
51
52         insinto "${MY_HTDOCSDIR}"
53         doins -r .
54
55         webapp_configfile "${MY_HTDOCSDIR}"/config.php-example
56         webapp_serverowned "${MY_HTDOCSDIR}"/config.php-example
57
58         webapp_src_install
59         if has_version app-emulation/virtualbox[vboxwebsrv] || \
60                 has_version app-emulation/virtualbox-bin[vboxwebsrv]
61         then
62                 newinitd "${FILESDIR}"/vboxinit-initd vboxinit
63         fi
64
65         readme.gentoo_create_doc
66 }
67
68 pkg_postinst() {
69         webapp_pkg_postinst
70         readme.gentoo_print_elog
71 }