sonarqube-bin: a new tool for source code review

This commit is contained in:
Anton Bolshakov 2014-07-15 02:47:15 +00:00
parent d258abe6f7
commit c35af86a84
5 changed files with 109 additions and 0 deletions

View file

@ -0,0 +1,4 @@
AUX init.sh 480 SHA256 115075e9da99f4f4a74f7b5fc55d2ae4fad0ff52b0622a49a434395b5caf7058 SHA512 70c0d5571da407d81e040609a28fdf4dfa69f0d0b71f126b3fa9314ab2d30250accfe14cf738e1802e58ae8609414a84254e8bcf02a61aa0067f915f46245773 WHIRLPOOL 0fe9d8cfcaaa74e7b158d947757aac593bbcef5767f60b3d7e98ca7a40f505559e859fcae9254f8c857a27098155282227e779f171fec2419f8194ab44aca686
AUX sonar.confd 9 SHA256 04a23430c235b1a5f17b4956e34bddc3db3e42d1a1fa8eef37d5d811417b7365 SHA512 3dfc306081161d2b0a5cb441db20971060a66234b73d99fcd5276bf29282823bec29eb18cf28083df8408e7f774829304bfd138bdf1398ef72fd303c735ad419 WHIRLPOOL 4efecf9263473ce88eda65786981ea43f17d96d07835c32ab8ad3dc4a8a023db4cfdd8c42bd1e279a8b3129e62b7e06fdf1ecb0c7efcf63358293f686d3169f5
DIST sonarqube-4.3.2.zip 71951140 SHA256 1c9fd395946deb47b796b51e1177c5001cddd992692b48ed5b7fcba2bdd8d0e6 SHA512 edaa331c9442ac66b08fca1b199ddbf0ad06af4c435bb0fec642c5d9a800c0ce731f85d876d0f256bd453e94b521f8065cbc8a9599de94238901b07a4dffda47 WHIRLPOOL 900255a1a9ef83c57f81399a07bec422bbb63aef58085713e102b55d11a01b74fdfd8c28e836fc91910ad774b2dcab3825dc0b815aa5cab9fce4ded9194d14d5
EBUILD sonarqube-bin-4.3.2.ebuild 1580 SHA256 1697350aac22e61c712ac07d5c924fc9873e560388577a9d0719f37e2c58245c SHA512 25f9a1c22b65c3179ab7a547967c5049f8429f7a0d11a194eff65421bb120f4417048c31d58c63148eea667a76100f995da8dfd07226cc694b942bf3fb7a81a6 WHIRLPOOL d62f67e862da31683a1b5bd60c33e848df3624326e8184450a9a6289cb047446f29add239de07c653da026cb4d5f9eee9ad2d9ed22b2de2c44a74faa548d622b

View file

@ -0,0 +1,33 @@
#!/sbin/runscript
depend() {
need net
use dns logger
}
RUN_AS=sonar
MACHINE_TYPE=`getconf LONG_BIT`
if [ "${MACHINE_TYPE}" = "64" ]; then
JSW=/opt/sonar/bin/linux-x86-64/sonar.sh
else
JSW=/opt/sonar/bin/linux-x86-32/sonar.sh
fi
checkconfig() {
return 0
}
start() {
checkconfig || return 1
ebegin "Starting ${SVCNAME}"
su $RUN_AS -c "$JSW start"
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
su $RUN_AS -c "$JSW stop"
eend $?
}

View file

@ -0,0 +1 @@
RUBYOPT=

View file

@ -0,0 +1,69 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
inherit java-pkg-2 user
DESCRIPTION="SonarQube is an open platform to manage code quality."
HOMEPAGE="http://www.sonarqube.org/"
LICENSE="LGPL-3"
MY_PV="${PV/_alpha/M}"
MY_PV="${MY_PV/_rc/-RC}"
MY_P="sonarqube-${MY_PV}"
SRC_URI="http://dist.sonar.codehaus.org/${MY_P}.zip"
RESTRICT="mirror"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""
S="${WORKDIR}/${MY_P}"
DEPEND="app-arch/unzip"
RDEPEND=">=virtual/jdk-1.6"
INSTALL_DIR="/opt/sonar"
pkg_setup() {
#enewgroup <name> [gid]
enewgroup sonar
#enewuser <user> [uid] [shell] [homedir] [groups] [params]
enewuser sonar -1 /bin/bash /opt/sonar "sonar"
}
src_unpack() {
unpack ${A}
cd "${S}"
# TODO remove unneded files
# Fix permissions
chmod -R a-x,a+X conf data extensions lib temp web COPYING
# Fix EOL in configuration files
for i in conf/* ; do
awk '{ sub("\r$", ""); print }' $i > $i.new
mv $i.new $i
done
}
src_install() {
insinto ${INSTALL_DIR}
doins -r bin conf data extensions lib logs temp web COPYING
newinitd "${FILESDIR}/init.sh" sonar
newconfd "${FILESDIR}"/sonar.confd sonar
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"
# Protect Sonar conf on upgrade
echo "CONFIG_PROTECT=\"${INSTALL_DIR}/conf\"" > "${T}/25sonar" || die
doenvd "${T}/25sonar"
}

View file

@ -25,3 +25,5 @@
~dev-util/capstone-2.1.2
~dev-util/radare2-capstone-2.1
~dev-util/sonarqube-bin-4.3.2