added fixed ebuild (copied from godin's overlay):
- in sonar-4.x, thw web-direcotry is called web, not war - enewgroup and enewuser requires the "user" eclass
This commit is contained in:
parent
e7e6a81b03
commit
17d53d28cb
3 changed files with 100 additions and 0 deletions
3
dev-util/sonar-bin/Manifest
Normal file
3
dev-util/sonar-bin/Manifest
Normal file
|
@ -0,0 +1,3 @@
|
|||
AUX init.sh 480 SHA256 115075e9da99f4f4a74f7b5fc55d2ae4fad0ff52b0622a49a434395b5caf7058 SHA512 70c0d5571da407d81e040609a28fdf4dfa69f0d0b71f126b3fa9314ab2d30250accfe14cf738e1802e58ae8609414a84254e8bcf02a61aa0067f915f46245773 WHIRLPOOL 0fe9d8cfcaaa74e7b158d947757aac593bbcef5767f60b3d7e98ca7a40f505559e859fcae9254f8c857a27098155282227e779f171fec2419f8194ab44aca686
|
||||
DIST sonarqube-4.1.2.zip 73927521 SHA256 3789f35c18ccb5c4d141140bed31e6b54a68c986c98ee3e7ad0fc56374e96d0c SHA512 e28c9e393066bb4a9088f979e87e0db785f5f685ad66b7e91e637f90127a49c051623080062e10eac5b26414caddfe7a29f12731bcb760ccaed609a835e8bbf8 WHIRLPOOL 98786936a67e7678e402641e17ffbe5ec66541525c29fbe899c53204f89983abf821d1dcba6799a66c287dc64171ccbd13ed1ea31860e57fa7180c8333808edc
|
||||
EBUILD sonar-bin-4.1.2.ebuild 1500 SHA256 3d57c71f02d43e9c8a320bb64c2e7ffdc5c315a04f98de7d5dd187096c63a729 SHA512 94c2c36ed0706b5cc563d8e6b4d6c0d50d93d6582df3c332707405f5dbb7694887f6e8adcc5256fc6777345dd58d430cf81563c43469e9564feecc306c901a4c WHIRLPOOL a1f17b1b4d905443c997039849eea1362e8739250c0604d1b4aa16b7a5668acf3b5aaacbb033649cae9dedab028fbc7698ab8c2290589dc878fe4a7f5a7c5575
|
33
dev-util/sonar-bin/files/init.sh
Normal file
33
dev-util/sonar-bin/files/init.sh
Normal 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 $?
|
||||
}
|
64
dev-util/sonar-bin/sonar-bin-4.1.2.ebuild
Normal file
64
dev-util/sonar-bin/sonar-bin-4.1.2.ebuild
Normal file
|
@ -0,0 +1,64 @@
|
|||
EAPI=5
|
||||
|
||||
inherit java-pkg-2 user
|
||||
|
||||
DESCRIPTION="SonarQube is an open platform to manage code quality."
|
||||
HOMEPAGE="http://sonarsource.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.5"
|
||||
|
||||
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 extras lib 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 extras lib logs web COPYING
|
||||
|
||||
newinitd "${FILESDIR}/init.sh" 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"
|
||||
}
|
Loading…
Reference in a new issue