diff options
author | Peter Lamby | 2015-07-12 12:05:31 +0200 |
---|---|---|
committer | Peter Lamby | 2015-07-12 12:05:31 +0200 |
commit | 4f4368a38b6e5de8171b73d09372f8e09912915e (patch) | |
tree | c9a99b8827d4ad4080c1bf7277fc244deac3f6b3 | |
download | aur-4f4368a38b6e5de8171b73d09372f8e09912915e.tar.gz |
Initial import of 4.5.4-1
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 63 | ||||
-rw-r--r-- | sonar.sh.patch | 11 | ||||
-rw-r--r-- | sonarqube-lts.install | 12 | ||||
-rw-r--r-- | sonarqube.service | 13 |
5 files changed, 121 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ed7c056d7784 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = sonarqube-lts + pkgdesc = An open platform to manage code quality + pkgver = 4.5.4 + pkgrel = 1 + url = http://www.sonarqube.org/ + install = sonarqube-lts.install + arch = i686 + arch = x86_64 + license = LGPL3 + depends = java-runtime>=7 + conflicts = sonar + conflicts = sonarqube + options = !strip + source = http://downloads.sonarsource.com/sonarqube/sonarqube-4.5.4.zip + source = sonarqube.service + source = sonar.sh.patch + md5sums = 59c454a0fa62fe1fe6c269616770b288 + md5sums = e98cb43f4f6b9af33312fa1d8aba88e3 + md5sums = 2b443049eede589adc4ad451197f1c10 + +pkgname = sonarqube-lts + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c0a8148d1825 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Peter Lamby <peterlamby@web.de> +pkgname=sonarqube-lts +pkgver=4.5.4 +pkgrel=1 +pkgdesc='An open platform to manage code quality' +arch=('i686' 'x86_64') +url='http://www.sonarqube.org/' +license=('LGPL3') +depends=('java-runtime>=7') +conflicts=('sonar' 'sonarqube') +options=('!strip') +install=sonarqube-lts.install +source=('http://downloads.sonarsource.com/sonarqube/sonarqube-4.5.4.zip' + 'sonarqube.service' + 'sonar.sh.patch') +md5sums=('59c454a0fa62fe1fe6c269616770b288' + 'e98cb43f4f6b9af33312fa1d8aba88e3' + '2b443049eede589adc4ad451197f1c10') + +prepare() { + cd ${srcdir} + + # Customize .service for $CARCH + if [ $CARCH = 'x86_64' ]; then + sed -i 's/ARCH/linux-x86-64/g' sonarqube.service + else + sed -i '/s/ARCH/linux-x86-32/g' sonarqube.service + fi + + cd sonarqube-${pkgver} + + + cd bin + # Delete unneeded binaries + rm -rf linux-ppc-64 macosx-universal-64 solaris* windows* + + if [ $CARCH = 'x86_64' ]; then + patch linux-x86-64/sonar.sh < "${srcdir}/sonar.sh.patch" + rm -rf linux-x86-32 + else + patch linux-x86-32/sonar.sh < "${srcdir}/sonar.sh.patch" + rm -rf linux-x86-64 + fi + cd .. + + # Fix EOL in configuration files + for i in conf/* ; do + awk '{ sub("\r$", ""); print }' $i > $i.new + mv $i.new $i + done +} + +package() { + cd "${srcdir}" + + install -Dm644 sonarqube.service "${pkgdir}/usr/lib/systemd/system/sonarqube.service" + + cd sonarqube-${pkgver} + install -d "${pkgdir}/opt/sonarqube" + cp -r * "${pkgdir}/opt/sonarqube/" + mkdir "${pkgdir}/opt/sonarqube/run" +} + diff --git a/sonar.sh.patch b/sonar.sh.patch new file mode 100644 index 000000000000..04f443e3c675 --- /dev/null +++ b/sonar.sh.patch @@ -0,0 +1,11 @@ +--- sonar.sh 2015-02-26 21:29:16.000000000 +0100 ++++ sonar.sh.new 2015-07-03 14:32:42.594080161 +0200 +@@ -30,7 +30,7 @@ + PRIORITY= + + # Location of the pid file. +-PIDDIR="." ++PIDDIR="../../run" + + # If uncommented, causes the Wrapper to be shutdown using an anchor file. + # When launched with the 'start' command, it will also ignore all INT and diff --git a/sonarqube-lts.install b/sonarqube-lts.install new file mode 100644 index 000000000000..cb2e4447eaac --- /dev/null +++ b/sonarqube-lts.install @@ -0,0 +1,12 @@ +pre_install() { + getent group sonarqube > /dev/null || groupadd -g 123 sonarqube 1>/dev/null + getent passwd sonarqube > /dev/null || useradd -u 123 -d /opt/sonarqube -g sonarqube -s /bin/false sonarqube 1>/dev/null +} + +post_install() { + chown -R sonarqube:sonarqube /opt/sonarqube/{logs,run,temp,data,extensions,web} +} + +post_upgrade() { + post_install +} diff --git a/sonarqube.service b/sonarqube.service new file mode 100644 index 000000000000..42a1d3b159b0 --- /dev/null +++ b/sonarqube.service @@ -0,0 +1,13 @@ +[Unit] +Description=An open platform to manage code quality +After=network.target + +[Service] +User=sonarqube +Group=sonarqube +PIDFile=/opt/sonarqube/run/SonarQube.pid +ExecStart=/opt/sonarqube/bin/ARCH/sonar.sh start +ExecStop=/opt/sonarqube/bin/ARCH/sonar.sh stop + +[Install] +WantedBy=multi-user.target |