summaryrefslogtreecommitdiff
path: root/app-emulation/phpvirtualbox
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-emulation/phpvirtualbox
reinit the tree, so we can have metadata
Diffstat (limited to 'app-emulation/phpvirtualbox')
-rw-r--r--app-emulation/phpvirtualbox/Manifest14
-rw-r--r--app-emulation/phpvirtualbox/files/vboxinit-initd39
-rw-r--r--app-emulation/phpvirtualbox/metadata.xml12
-rw-r--r--app-emulation/phpvirtualbox/phpvirtualbox-4.1.11.ebuild65
-rw-r--r--app-emulation/phpvirtualbox/phpvirtualbox-4.2.7.ebuild71
-rw-r--r--app-emulation/phpvirtualbox/phpvirtualbox-4.3.0.ebuild71
-rw-r--r--app-emulation/phpvirtualbox/phpvirtualbox-5.0.3.ebuild71
-rw-r--r--app-emulation/phpvirtualbox/phpvirtualbox-5.0.5.ebuild71
8 files changed, 414 insertions, 0 deletions
diff --git a/app-emulation/phpvirtualbox/Manifest b/app-emulation/phpvirtualbox/Manifest
new file mode 100644
index 000000000000..f7e5b6767695
--- /dev/null
+++ b/app-emulation/phpvirtualbox/Manifest
@@ -0,0 +1,14 @@
+AUX vboxinit-initd 1137 SHA256 ec7449330e800aadcebcce619d5b4de8893ce10550e7147d4ee3e5f2b55afe50 SHA512 f58deaa89e34a05664f072dea2602fbc08c29301d9501631ded31a4fb0d996e756e269cbebd357dcdf7758c1927602384de0bb2c65366e0a0a858cedb9288770 WHIRLPOOL ff52dbca28a806aa7d8cbfa41c51f253dd36ac4bfc3f7bc87be85b8f69ad765a2ff1045b50d94c96968d748e287e1f8c6e20d441b0464f437ec8111371cfdf12
+DIST phpvirtualbox-4.1-11.zip 2763347 SHA256 91a78c7dead035edf8138a363c6b3cb89d8f348fa3c38455af232f51bcf592ef SHA512 c5eb1b9fd0bba20e3dda9cbe6985c60d953a340d77b9427f344e8b595a06a5d9805209cf73704fb93de5ee2f412e02cb1434ed0e983b0622cf8a8172d7dff9a5 WHIRLPOOL ca95767f63f3c018738de36dede1859e0b6185cd22d4f7a40128dd5a14791ca9402a2ef54c4928c1a4c4408ddcb62b312a4d05743c0722f9a8fee1555df4021a
+DIST phpvirtualbox-4.2-7.zip 3425805 SHA256 3dc078d7058d75aa5745f531a6d485a11fff18972df1a638a749f019e0196e4e SHA512 a066f127115a83c6061e8c0ff6447464818511f3ab7805c119f75ddc88459efd144d45fb358ce52959301f2f1a4f2609f7f42c2bb24213a5be98f2036085a81b WHIRLPOOL d6cf095b9768b7a9c0113c8df354dad124a0b2dc0a52e8518dfde230823c95dcad6b6e3df56cc41a4474b8b73cb281f3bfc91f417078e0b6f1136acd70dca4cf
+DIST phpvirtualbox-4.3-0.zip 4231805 SHA256 e33eea5553fb134ba6a1203e33e212bc5764c05b28164dcc02c6d66af565c293 SHA512 fd49a6a4c79d75f37fd40d74743f295a148548373ab046cf1f31ef7b982008ea6b9d2838cdad2dc37a1d266ed630cd2ddb7f7423ea62af1e0f8f9f76a12c0e9d WHIRLPOOL 1c96ec2fe19092dabac9e04be596974cc4dbaa9993c34e76b938036e8e04c67dc4f4f344be8afd636d603a478ce0c85435a75f8d6cf59bbdc3a11c6fd575b6c1
+DIST phpvirtualbox-5.0-3.zip 4092132 SHA256 8e23eee4ee36ff8cf765afb6842338e8ea8190956882ec0baa30f09ff4fe134b SHA512 b632ff3be2028bd011ce27b580996638dfc89e09350c459f16bd1c8c5c3eefbab93f42d7facfb99279eb2ee1c6a38854ea999654ca2090a39c7bfa0afa7fe2d5 WHIRLPOOL 38070a6935e3a4e5155f84db395c9e82603583957b26fcf166a654446052b15aa3d3b7653a9f7d56a33382dc82058e55413575e75c26b4c97f782bb868cc66e8
+DIST phpvirtualbox-5.0-5.zip 4093766 SHA256 c80c423fda30e5795872c9b9adc68429deee5726e468729472a573c324303c05 SHA512 5478e4a5eb74786eb409a87e7c962c80df558655342f541dddceb7e4cf153a4e5f0bda9b83c2a8a921326f6210c2c3bd344c4a9ce30547f25acce5966c4d6135 WHIRLPOOL e1cd9e91f74e403ea38c099cbaec495fc56551757a75c7348673251846dd4d433d37d1147ba68b4df673efb6ff9ac3cdeb4457aa80af03ea791fc48d1eece5eb
+EBUILD phpvirtualbox-4.1.11.ebuild 1789 SHA256 c1ea30e07b0ed5faffbe853bace0e8eeb92aca0a75655dae6b7984d506c0ee5b SHA512 5cc57998b5c46bb3285a3ea6be0d91a002f6b15742888baf7818b01ee9caa0f47dc564f7554329f90e9463d05a83b7879f07a0bd785c952fe876b6b2b6c27dad WHIRLPOOL 0a1869fcc4f58a8be98220d468df1517ac7ed212bc703fc39578f8e3f686f8411c37d3d3a9fd8cbb72ccd070466c48ac3d6f5c7587f2b09e5365dacc635e4266
+EBUILD phpvirtualbox-4.2.7.ebuild 1779 SHA256 7e59a05f6a8d92775a9d07d2fa855fde5b74a04e1364a927e072ea5e283d830f SHA512 d23aef6bd479d68d40e17a09d3d93930869e8e2cd2fe83047f82532a40919b36ed607c165b301595ac0e5f0bfd25123d99bd46b08439363c67fce981767688da WHIRLPOOL ccd08968b44e07d3c07ab4b173606f889d6376ec6a6cafad70a3a82436d5647589611c801161114f1c2cfd805cb47252a108c6e585124394c1de57f3d1c76390
+EBUILD phpvirtualbox-4.3.0.ebuild 1771 SHA256 6e366595239554c81545fd80d38e73256d79b4347e2e2b8ffea8d54ddaa33aae SHA512 72cbe2fe6dca2e61fea66e5da7c10b844bf1a4f650ff9a32572b04136b06d989deb2aa110bdb63133ea9946a90103b6f2f3cc588b6f151e943e3175b2f7489fd WHIRLPOOL 8c0d6e09096332606d7174f61c9ce59753d118ba1dddd2262183a7a63275bdc6c1fa7f497398109a6eb0c19cf8f102b40b4e6b6388522df949c9989c93388983
+EBUILD phpvirtualbox-5.0.3.ebuild 1779 SHA256 61ebab71addc565bafc750e4c738370644039487417be928f6f888e9006c607c SHA512 ee7a040f11c7660fad03907e8e181620e066e7a7fc421b23e50f1e88b73e6288e47ff68f9a47c72d1e8be6c9b50cd4f5099f6e02f8fc2803a54820cb6cc76b3c WHIRLPOOL f6369d0c78a109914caa6612ee36eb1a60758ba7fb4089510d72c99f93f3145144cad74460b0ed8686f0070ebef92530a9359456118fdbe278103af489296066
+EBUILD phpvirtualbox-5.0.5.ebuild 1777 SHA256 e8253534a44f2a1065095e48b51f4317df75bd2b1a072b6ce19d7d16027e96d5 SHA512 faf7326b0df465ad260b07632bfb6b5a4c7f0e164d560d65956cffc17210ebd1d32fb14f6b082280afe7e73f44b9a5b84c4c2e99e2da3c4698275ab402f6be2d WHIRLPOOL 7b3cd28fa9065b760a0795522619dbc3c452632fbc685561ce1119527125b2a9eaea088aab3e7c5cc436b081ddb3cc7cb795a524e0a05f67fbce8dfb96d8e89f
+MISC ChangeLog 4159 SHA256 b98589e2cae2117fe363570f246a706b57cc79f658fc07d44847cf0e77b25815 SHA512 8add03252c426d37b2c0296c8eceec8950ac0a23ffe83282cfc41cca50c8910334c23beff040c285394a4e6c14f10cc0cfd698f726907f795e4c0fa810b1dabd WHIRLPOOL 621e0a9f46e3f64799bb80f115aeb0fca53adbc78b3a2cbb4e324be35a1b456c7201a6b61192901a9369ad46cd61843bf6f933aa412311d8a72999a9342945a9
+MISC ChangeLog-2015 2614 SHA256 fcbb7c7df5b3273885e395d544e71fcd790d4201117781fca46d3b49d48c38a7 SHA512 602c9a548e477a02c10b71a87c71577fed087354a17b894636fa1f26f991b98418e95beb226f3db0cebc635bca750f4fab85c740e6849fefe672eac495966fbc WHIRLPOOL bc8dfeeaed89876752092dffaf61a73bfdc824d8d61f626968259d861c19cc6c5d08653dc5b8ad98814ba3e60354723c884534cdd1472c0e9a629bfdd1076403
+MISC metadata.xml 391 SHA256 b9c63539e9551bbf965572449f544455a60eaf0da3fcbcc51cb67dd19304f0f7 SHA512 8518a50e3abf876a271671bb64e05c8e5dc00aa2e7f482b177ceb3bf188e9ac5e71356568512031727199b2dcb0baebda99a730cc58fd4cd39e4280698407e86 WHIRLPOOL ec51eec634ced009d7c28c3321503fed1b2afbca05aa7155eff9fe17de175af0f8d87036ec5d8e7298035686ac67e5c11b22d1cfdba9c46e050df1f573b4f7a0
diff --git a/app-emulation/phpvirtualbox/files/vboxinit-initd b/app-emulation/phpvirtualbox/files/vboxinit-initd
new file mode 100644
index 000000000000..891137a2d267
--- /dev/null
+++ b/app-emulation/phpvirtualbox/files/vboxinit-initd
@@ -0,0 +1,39 @@
+#!/sbin/openrc-run
+
+description="Controls VirtualBox sessions"
+
+. /etc/conf.d/vboxwebsrv
+
+su_command="su - ${VBOXWEBSRV_USER} -c"
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+start() {
+ einfo "Starting VirtualBox machines"
+ eindent
+ MACHINES=$($su_command "VBoxManage list vms | awk '{ print \$NF }' | sed -e 's/[{}]//g'")
+ for UUID in $MACHINES; do
+ STARTUP=$($su_command "VBoxManage getextradata $UUID 'pvbx/startupMode'" | awk '{ print $NF }')
+ VMNAME=$($su_command "VBoxManage showvminfo $UUID | sed -n '0,/^Name:/s/^Name:[ \t]*//p'")
+ if [ "${STARTUP}" == "auto" ]; then
+ ebegin "Starting machine ${VMNAME}"
+ $su_command "VBoxManage startvm $UUID --type headless" &>> /var/log/vboxinit.log
+ eend $?
+ fi
+ done
+}
+
+stop() {
+ einfo "Saving VirtualBox machines"
+ eindent
+ MACHINES=$($su_command "VBoxManage list runningvms | awk '{ print \$NF }' | sed -e 's/[{}]//g'")
+ for UUID in $MACHINES; do
+ VMNAME=$($su_command "VBoxManage showvminfo $UUID | sed -n '0,/^Name:/s/^Name:[ \t]*//p'")
+ ebegin "Stopping machine ${VMNAME}"
+ $su_command "VBoxManage controlvm $UUID savestate" &>> /var/log/vboxinit.log
+ eend $?
+ done
+}
diff --git a/app-emulation/phpvirtualbox/metadata.xml b/app-emulation/phpvirtualbox/metadata.xml
new file mode 100644
index 000000000000..60ad403971c9
--- /dev/null
+++ b/app-emulation/phpvirtualbox/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">phpvirtualbox</remote-id>
+ <remote-id type="sourceforge">phpvirtualbox</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-emulation/phpvirtualbox/phpvirtualbox-4.1.11.ebuild b/app-emulation/phpvirtualbox/phpvirtualbox-4.1.11.ebuild
new file mode 100644
index 000000000000..de7e19448c92
--- /dev/null
+++ b/app-emulation/phpvirtualbox/phpvirtualbox-4.1.11.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit versionator eutils webapp
+
+MY_PV="$(replace_version_separator 2 '-')"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Web-based administration for VirtualBox in PHP"
+HOMEPAGE="https://sourceforge.net/projects/phpvirtualbox/"
+SRC_URI="https://${PN}.googlecode.com/files/${MY_P}.zip"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-lang/php[session,unicode,soap,gd]
+ virtual/httpd-php
+"
+DEPEND="app-arch/unzip"
+
+src_install() {
+ webapp_src_preinst
+
+ cd ${MY_P}
+
+ dodoc CHANGELOG.txt LICENSE.txt README.txt || die
+ rm -f CHANGELOG.txt LICENSE.txt README.txt
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r .
+
+ webapp_configfile "${MY_HTDOCSDIR}"/config.php-example
+ webapp_serverowned "${MY_HTDOCSDIR}"/config.php-example
+
+ webapp_src_install
+ if has_version app-emulation/virtualbox[vboxwebsrv] || \
+ has_version app-emulation/virtualbox-bin[vboxwebsrv]
+ then
+ newinitd "${FILESDIR}"/vboxinit-initd vboxinit
+ fi
+}
+
+pkg_postinst() {
+ webapp_pkg_postinst
+ elog "Local or remote virtualbox hosts must be compiled with"
+ elog "'vboxwebsrv' useflag and the respective init script"
+ elog "must be running to use this interface"
+ elog " /etc/init.d/vboxwebsrv start"
+ elog
+ elog "To enable the automatic startup mode feature uncomment the"
+ elog "following line in the config.php file:"
+ elog " var \$startStopConfig = true;"
+ elog
+ elog "You should also add the /etc/init.d/vboxinit script to the"
+ elog "default runlevel on the virtualbox host:"
+ elog "\`rc-update add vboxinit default\`"
+ elog "If the server is on a remote host, than the script must be"
+ elog "copied manually from"
+ elog "${FILESDIR}/vboxinit-initd to /etc/init.d/vboxinit"
+ elog "on the remote host."
+}
diff --git a/app-emulation/phpvirtualbox/phpvirtualbox-4.2.7.ebuild b/app-emulation/phpvirtualbox/phpvirtualbox-4.2.7.ebuild
new file mode 100644
index 000000000000..c87ab7614462
--- /dev/null
+++ b/app-emulation/phpvirtualbox/phpvirtualbox-4.2.7.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit versionator eutils webapp readme.gentoo
+
+MY_PV="$(replace_version_separator 2 '-')"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Web-based administration for VirtualBox in PHP"
+HOMEPAGE="https://sourceforge.net/projects/phpvirtualbox/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-lang/php[session,unicode,soap,gd]
+ virtual/httpd-php:*
+"
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}"/${MY_P}
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Local or remote virtualbox hosts must be compiled with
+'vboxwebsrv' useflag and the respective init script
+must be running to use this interface:
+/etc/init.d/vboxwebsrv start
+
+To enable the automatic startup mode feature uncomment the
+following line in the config.php file:
+var \$startStopConfig = true;
+
+You should also add the /etc/init.d/vboxinit script to the
+default runlevel on the virtualbox host:
+\`rc-update add vboxinit default\`
+If the server is on a remote host, than the script must be
+copied manually from
+'${FILESDIR}'/vboxinit-initd to
+/etc/init.d/vboxinit on the remote host."
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc CHANGELOG.txt LICENSE.txt README.txt
+ rm -f CHANGELOG.txt LICENSE.txt README.txt
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r .
+
+ webapp_configfile "${MY_HTDOCSDIR}"/config.php-example
+ webapp_serverowned "${MY_HTDOCSDIR}"/config.php-example
+
+ webapp_src_install
+ if has_version app-emulation/virtualbox[vboxwebsrv] || \
+ has_version app-emulation/virtualbox-bin[vboxwebsrv]
+ then
+ newinitd "${FILESDIR}"/vboxinit-initd vboxinit
+ fi
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ webapp_pkg_postinst
+ readme.gentoo_print_elog
+}
diff --git a/app-emulation/phpvirtualbox/phpvirtualbox-4.3.0.ebuild b/app-emulation/phpvirtualbox/phpvirtualbox-4.3.0.ebuild
new file mode 100644
index 000000000000..05e465bd19fa
--- /dev/null
+++ b/app-emulation/phpvirtualbox/phpvirtualbox-4.3.0.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit versionator eutils webapp readme.gentoo
+
+MY_PV="$(replace_version_separator 2 '-')"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Web-based administration for VirtualBox in PHP"
+HOMEPAGE="https://sourceforge.net/projects/phpvirtualbox/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-lang/php[session,unicode,soap,gd]
+ virtual/httpd-php:*
+"
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Local or remote virtualbox hosts must be compiled with
+'vboxwebsrv' useflag and the respective init script
+must be running to use this interface:
+/etc/init.d/vboxwebsrv start
+
+To enable the automatic startup mode feature uncomment the
+following line in the config.php file:
+var \$startStopConfig = true;
+
+You should also add the /etc/init.d/vboxinit script to the
+default runlevel on the virtualbox host:
+\`rc-update add vboxinit default\`
+If the server is on a remote host, than the script must be
+copied manually from
+'${FILESDIR}'/vboxinit-initd to
+/etc/init.d/vboxinit on the remote host."
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc CHANGELOG.txt LICENSE.txt README.txt
+ rm -f CHANGELOG.txt LICENSE.txt README.txt
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r .
+
+ webapp_configfile "${MY_HTDOCSDIR}"/config.php-example
+ webapp_serverowned "${MY_HTDOCSDIR}"/config.php-example
+
+ webapp_src_install
+ if has_version app-emulation/virtualbox[vboxwebsrv] || \
+ has_version app-emulation/virtualbox-bin[vboxwebsrv]
+ then
+ newinitd "${FILESDIR}"/vboxinit-initd vboxinit
+ fi
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ webapp_pkg_postinst
+ readme.gentoo_print_elog
+}
diff --git a/app-emulation/phpvirtualbox/phpvirtualbox-5.0.3.ebuild b/app-emulation/phpvirtualbox/phpvirtualbox-5.0.3.ebuild
new file mode 100644
index 000000000000..d299a2e28b04
--- /dev/null
+++ b/app-emulation/phpvirtualbox/phpvirtualbox-5.0.3.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit versionator eutils webapp readme.gentoo
+
+MY_PV="$(replace_version_separator 2 '-')"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Web-based administration for VirtualBox in PHP"
+HOMEPAGE="https://sourceforge.net/projects/phpvirtualbox/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-lang/php[session,unicode,soap,gd]
+ virtual/httpd-php:*
+"
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}/${MY_P}"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Local or remote virtualbox hosts must be compiled with
+'vboxwebsrv' useflag and the respective init script
+must be running to use this interface:
+/etc/init.d/vboxwebsrv start
+
+To enable the automatic startup mode feature uncomment the
+following line in the config.php file:
+var \$startStopConfig = true;
+
+You should also add the /etc/init.d/vboxinit script to the
+default runlevel on the virtualbox host:
+\`rc-update add vboxinit default\`
+If the server is on a remote host, than the script must be
+copied manually from
+'${FILESDIR}'/vboxinit-initd to
+/etc/init.d/vboxinit on the remote host."
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc CHANGELOG.txt LICENSE.txt README.txt
+ rm -f CHANGELOG.txt LICENSE.txt README.txt
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r .
+
+ webapp_configfile "${MY_HTDOCSDIR}"/config.php-example
+ webapp_serverowned "${MY_HTDOCSDIR}"/config.php-example
+
+ webapp_src_install
+ if has_version app-emulation/virtualbox[vboxwebsrv] || \
+ has_version app-emulation/virtualbox-bin[vboxwebsrv]
+ then
+ newinitd "${FILESDIR}"/vboxinit-initd vboxinit
+ fi
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ webapp_pkg_postinst
+ readme.gentoo_print_elog
+}
diff --git a/app-emulation/phpvirtualbox/phpvirtualbox-5.0.5.ebuild b/app-emulation/phpvirtualbox/phpvirtualbox-5.0.5.ebuild
new file mode 100644
index 000000000000..b6cb641a6e5a
--- /dev/null
+++ b/app-emulation/phpvirtualbox/phpvirtualbox-5.0.5.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit versionator eutils webapp readme.gentoo
+
+MY_PV="$(replace_version_separator 2 '-')"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Web-based administration for VirtualBox in PHP"
+HOMEPAGE="https://sourceforge.net/projects/phpvirtualbox/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-lang/php[session,unicode,soap,gd]
+ virtual/httpd-php:*
+"
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}/${MY_P}"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Local or remote virtualbox hosts must be compiled with
+'vboxwebsrv' useflag and the respective init script
+must be running to use this interface:
+/etc/init.d/vboxwebsrv start
+
+To enable the automatic startup mode feature uncomment the
+following line in the config.php file:
+var \$startStopConfig = true;
+
+You should also add the /etc/init.d/vboxinit script to the
+default runlevel on the virtualbox host:
+\`rc-update add vboxinit default\`
+If the server is on a remote host, than the script must be
+copied manually from
+'${FILESDIR}'/vboxinit-initd to
+/etc/init.d/vboxinit on the remote host."
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc CHANGELOG.txt LICENSE.txt README.md
+ rm -f CHANGELOG.txt LICENSE.txt README.md
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r .
+
+ webapp_configfile "${MY_HTDOCSDIR}"/config.php-example
+ webapp_serverowned "${MY_HTDOCSDIR}"/config.php-example
+
+ webapp_src_install
+ if has_version app-emulation/virtualbox[vboxwebsrv] || \
+ has_version app-emulation/virtualbox-bin[vboxwebsrv]
+ then
+ newinitd "${FILESDIR}"/vboxinit-initd vboxinit
+ fi
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ webapp_pkg_postinst
+ readme.gentoo_print_elog
+}