summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAgostino Sarubbo <ago@gentoo.org>2019-11-12 16:50:22 +0100
committerAgostino Sarubbo <ago@gentoo.org>2019-11-12 16:50:22 +0100
commit2a9cf29772f03ab670b5c12afffbc4fd3333df77 (patch)
tree050ac1c6908b4bfeb3f2b6801a20e538b1988e62 /app-metrics/queuemetrics/queuemetrics-19.10.3.ebuild
parentapp-metrics/queuemetrics: version bump to 19.10.2 (diff)
downloadago-2a9cf29772f03ab670b5c12afffbc4fd3333df77.tar.gz
ago-2a9cf29772f03ab670b5c12afffbc4fd3333df77.tar.bz2
ago-2a9cf29772f03ab670b5c12afffbc4fd3333df77.zip
app-metrics/queuemetrics: version bump to 19.10.3
Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
Diffstat (limited to 'app-metrics/queuemetrics/queuemetrics-19.10.3.ebuild')
-rw-r--r--app-metrics/queuemetrics/queuemetrics-19.10.3.ebuild71
1 files changed, 71 insertions, 0 deletions
diff --git a/app-metrics/queuemetrics/queuemetrics-19.10.3.ebuild b/app-metrics/queuemetrics/queuemetrics-19.10.3.ebuild
new file mode 100644
index 0000000..5a5a900
--- /dev/null
+++ b/app-metrics/queuemetrics/queuemetrics-19.10.3.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# DISCLAIMER:
+# This ebuild does NOT follow the Gentoo QA Rules, instead it follows the upstream way to install and run the application
+
+EAPI=7
+
+inherit user systemd
+
+TOMCAT_VERSION="8.5.47"
+
+DESCRIPTION="A monitoring and reporting suite for asterisk based PBX"
+HOMEPAGE="https://www.queuemetrics.com"
+LICENSE="all-rights-reserved"
+SRC_URI="https://archive.apache.org/dist/tomcat/tomcat-8/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz \
+ https://downloads.loway.ch/qm/QueueMetrics-${PV}.tar.gz"
+RESTRICT="mirror"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+mysql uniloader"
+
+RDEPEND="virtual/jdk:1.8"
+PDEPEND="mysql? ( virtual/mysql[server] )
+ uniloader? ( app-metrics/uniloader )"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+
+ if [ "$( cat /opt/queuemetrics/tomcat/VERSION )" != "${TOMCAT_VERSION}" ]
+ then
+ ewarn
+ ewarn
+ ewarn "This ebuild will install a newer version of apache tomcat."
+ ewarn "You need to restart udev as soon as possible to make the upgrade go into effect."
+ ewarn "For sys-apps/openrc users it is:"
+ ewarn "# /etc/init.d/queuemetrics restart"
+ ewarn
+ ewarn "For sys-apps/systemd users it is:"
+ ewarn "# systemctl restart queuemetrics"
+ ewarn
+ ewarn
+ fi
+}
+
+src_install() {
+ dodir /opt/${PN}/tomcat/{logs,temp,webapps,work}
+ insinto /opt/${PN}/tomcat
+ doins -r apache-tomcat-${TOMCAT_VERSION}/{bin,conf,lib}
+
+ cp ${FILESDIR}/server.xml "${D}"/opt/${PN}/tomcat/conf/
+
+ fowners -R ${PN}:${PN} /opt/${PN}
+ fperms 0750 /opt/${PN}
+
+ cp -r ${P} "${D}"/opt/${PN}/tomcat/webapps/${PN}
+
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_dounit "${FILESDIR}/${PN}.socket"
+ systemd_install_serviced "${FILESDIR}/${PN}.service.conf"
+
+ doenvd "${FILESDIR}/25${PN}"
+
+ echo "${TOMCAT_VERSION}" > "${D}"/opt/${PN}/tomcat/VERSION
+}