summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUltrabug <ultrabug@gentoo.org>2019-11-12 16:43:02 +0100
committerUltrabug <ultrabug@gentoo.org>2019-11-12 16:43:02 +0100
commit3bcf5eb96aa159404259764afbf1ed91f28cf8f2 (patch)
tree71da70625c275b35e3eb4940dba487e98a3ab56b /app-admin/scylla-jmx/scylla-jmx-3.1.1.ebuild
parentapp-admin/scylla-manager: update to 1.4.2 (diff)
downloadultrabug-3bcf5eb96aa159404259764afbf1ed91f28cf8f2.tar.gz
ultrabug-3bcf5eb96aa159404259764afbf1ed91f28cf8f2.tar.bz2
ultrabug-3bcf5eb96aa159404259764afbf1ed91f28cf8f2.zip
app-admin/scylla-jmx: version bump
Package-Manager: Portage-2.3.78, Repoman-2.3.17 Manifest-Sign-Key: 34FCB257983BA23A8CEC5EB7EB9E6405C24BFAE5 Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
Diffstat (limited to 'app-admin/scylla-jmx/scylla-jmx-3.1.1.ebuild')
-rw-r--r--app-admin/scylla-jmx/scylla-jmx-3.1.1.ebuild91
1 files changed, 91 insertions, 0 deletions
diff --git a/app-admin/scylla-jmx/scylla-jmx-3.1.1.ebuild b/app-admin/scylla-jmx/scylla-jmx-3.1.1.ebuild
new file mode 100644
index 0000000..025cfbe
--- /dev/null
+++ b/app-admin/scylla-jmx/scylla-jmx-3.1.1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PV="${PV/_beta/}"
+EGIT_CLONE_TYPE="mirror"
+EGIT_COMMIT="scylla-${MY_PV}"
+EGIT_REPO_URI="https://github.com/scylladb/scylla-jmx.git"
+inherit git-r3
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit java-pkg-2 python-r1 systemd user
+
+DESCRIPTION="Scylla JMX"
+HOMEPAGE="https://github.com/scylladb/scylla-jmx"
+
+KEYWORDS="~amd64"
+LICENSE="Apache-2.0"
+SLOT="0"
+
+CDEPEND="dev-java/maven-bin:3.3"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${CDEPEND}
+ ${PYTHON_DEPS}
+ dev-python/pystache[${PYTHON_USEDEP}]
+ >=virtual/jre-1.8"
+
+DEPEND="
+ ${CDEPEND}
+ >=virtual/jdk-1.8"
+
+RESTRICT="test"
+
+pkg_setup() {
+ enewgroup scylla
+ enewuser scylla -1 -1 /var/lib/${PN} scylla
+}
+
+src_prepare() {
+ default
+
+ # fix symlink runtime error on scylla-jmx script
+ # * scylla-jmx is not available for oracle-jdk-bin-1.8 on x86_64
+ # * IMPORTANT: some Java tools are not available on some VMs on some architectures
+ sed -e 's@"$LOCATION_SCRIPTS"/symlinks/scylla-jmx@/usr/bin/java@g' -i scripts/scylla-jmx || die
+}
+
+src_compile() {
+ mvn -B install || die
+}
+
+src_install() {
+ default
+
+ insinto /etc/default
+ doins dist/common/sysconfig/scylla-jmx
+
+ insinto /usr/lib/scylla/jmx
+ doins target/scylla-jmx-1.0.jar
+
+ # removed because of src_prepare fix
+ #dodir /usr/lib/scylla/jmx/symlinks
+ #dosym /usr/bin/java /usr/lib/scylla/jmx/symlinks/scylla-jmx
+
+ exeinto /usr/lib/scylla/jmx
+ doexe scripts/scylla-jmx
+
+ newinitd "${FILESDIR}/scylla-jmx.initd" ${PN}
+ newconfd "${FILESDIR}/scylla-jmx.confd" ${PN}
+
+ local MUSTACHE_DIST="\"debian\": true"
+ pystache dist/common/systemd/scylla-jmx.service.mustache "{ $MUSTACHE_DIST }" > scylla-jmx.service
+ systemd_dounit scylla-jmx.service
+}
+
+pkg_postinst() {
+ ping -c1 `hostname` > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ ewarn
+ ewarn "**************************************************************"
+ ewarn "* WARNING: You need to add hostname on /etc/hosts, otherwise *"
+ ewarn "* scylla-jmx will not able to start up. *"
+ ewarn "**************************************************************"
+ ewarn
+ fi
+}