From 6d88fdbdc57f0dbec367b1107a2dc5658b7bb15e Mon Sep 17 00:00:00 2001 From: blshkv Date: Fri, 22 Mar 2019 13:24:55 +0800 Subject: [PATCH] sonarqube-bin: 7.7 bump --- dev-util/sonarqube-bin/Manifest | 1 + .../sonarqube-bin/sonarqube-bin-7.7.ebuild | 73 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 dev-util/sonarqube-bin/sonarqube-bin-7.7.ebuild diff --git a/dev-util/sonarqube-bin/Manifest b/dev-util/sonarqube-bin/Manifest index 86eecd116..8be19fc4b 100644 --- a/dev-util/sonarqube-bin/Manifest +++ b/dev-util/sonarqube-bin/Manifest @@ -1 +1,2 @@ DIST sonarqube-7.6.zip 189719547 BLAKE2B a2b00327e8a59391d227598f4546a2f4403c316d20bd29e5190a58b114e047f07eab66bf4d81c31c077da8bb0dd004240991a6ee52e5552330d4ee1dbece4365 SHA512 6ba83a696422f90acad4e21623b819c5e0e88b52d693a1d03a829174645feaa45407f38e68f33b33c1ec5fe953550e8984bd746574e66e6001f61e3dce9b9729 +DIST sonarqube-7.7.zip 196832147 BLAKE2B 14f54c6d687e25fef605a0cb44c371680a335d240ff5867c83e002c2967b3f8a5054a071b439380e491a144e37f033405fb5024626e1aa1c79a47a723e5938f2 SHA512 2da0d0143c9158bd958bbff08a0ca3a249e7bbc17acc789b8ba11cd6aa481f1d37d57497ce28f0e724d25d1008f2b0684df73b9cd39fc879e4c183e9c1d85e7a diff --git a/dev-util/sonarqube-bin/sonarqube-bin-7.7.ebuild b/dev-util/sonarqube-bin/sonarqube-bin-7.7.ebuild new file mode 100644 index 000000000..e4458b5e5 --- /dev/null +++ b/dev-util/sonarqube-bin/sonarqube-bin-7.7.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit user systemd + +DESCRIPTION="SonarQube Community Edition is an open platform to manage code quality." +HOMEPAGE="https://www.sonarqube.org/" +LICENSE="LGPL-3" +MY_PV="${PV/_alpha/M}" +MY_PV="${MY_PV/_rc/-RC}" +MY_P="sonarqube-${MY_PV}" +SRC_URI="https://binaries.sonarsource.com/Distribution/sonarqube/${MY_P}.zip" +RESTRICT="mirror" +SLOT="0" +KEYWORDS="~amd64" +IUSE="systemd" + +S="${WORKDIR}/${MY_P}" + +DEPEND="app-arch/unzip" +RDEPEND=">=virtual/jdk-1.8" + +INSTALL_DIR="/opt/sonar" + +pkg_setup() { + #enewgroup [gid] + enewgroup sonar + #enewuser [uid] [shell] [homedir] [groups] [params] + enewuser sonar -1 /bin/bash /opt/sonar "sonar" +} + +src_unpack() { + unpack ${A} + + # TODO remove unneeded files +} + +src_install() { + insinto ${INSTALL_DIR} + doins -r bin conf data elasticsearch extensions lib logs temp web COPYING + insinto ${INSTALL_DIR}/bin + doins "${FILESDIR}"/linux-multiarch.sh + + newconfd "${FILESDIR}/sonar.conf" sonar + newinitd "${FILESDIR}/sonar.init" sonar + + if use systemd; then + systemd_dounit "${FILESDIR}"/sonar.service + fi + + fowners -R sonar:sonar ${INSTALL_DIR} + +# fperms 755 "${INSTALL_DIR}/bin/linux-x86-32/sonar.sh" +# fperms 755 "${INSTALL_DIR}/bin/linux-x86-32/wrapper" + + fperms 755 "${INSTALL_DIR}/bin/linux-x86-64/sonar.sh" + fperms 755 "${INSTALL_DIR}/bin/linux-x86-64/wrapper" + + fperms 755 "${INSTALL_DIR}/bin/linux-multiarch.sh" + + fperms -R 755 "${INSTALL_DIR}/elasticsearch" + + # Protect Sonar conf on upgrade + echo "CONFIG_PROTECT=\"${INSTALL_DIR}/conf\"" > "${T}/25sonar" || die + doenvd "${T}/25sonar" +} + +pkg_postinst() { + einfo "Please complete the upgrade using the following guideline:" + einfo "https://docs.sonarqube.org/display/SONAR/Upgrading" +}