1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

New port: devel/sonarqube

The SonarQube platform is an open source quality management platform,
dedicated to continuously analyzing and measuring the technical quality of
source code, from project portfolio down to the method level.

Features:
- Supports languages: Java, C/C++, Objective-C, C#, PHP, Flex, Groovy,
  JavaScript, Python, PL/SQL, COBOL, etc.
- Can also be used in Android development.
- Offers reports on duplicated code, coding standards, unit tests, code
  coverage, complex code, potential bugs, comments and design and
  architecture.
- Records metrics history and provides evolution graphs ("time machine")
  and differential views.
- Provides fully automated analyses: integrates with Maven, Ant, Gradle and
  continuous integration tools (Atlassian Bamboo, Jenkins, Hudson, etc.).
- Integrates with the Eclipse development environment.
- Integrates with external tools: JIRA, Mantis, LDAP, Fortify, etc.
- Is expandable with the use of plugins.
- Implements the SQALE methodology to compute technical debt.

WWW: http://www.sonarqube.org/

PR:		203077
Submitted by:	Dusan Vejnovic <freebsd@dussan.org>
This commit is contained in:
Jason Unovitch 2016-06-25 22:48:41 +00:00
parent 5c332ae6cb
commit a0117ecf14
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=417498
8 changed files with 2429 additions and 0 deletions

View File

@ -5306,6 +5306,7 @@
SUBDIR += smokeqt
SUBDIR += smv
SUBDIR += soapui
SUBDIR += sonarqube
SUBDIR += sope2
SUBDIR += sope3
SUBDIR += sourcenav

83
devel/sonarqube/Makefile Normal file
View File

@ -0,0 +1,83 @@
# Created by: Dusan Vejnovic <freebsd@dussan.org>
# $FreeBSD$
PORTNAME= sonarqube
PORTVERSION= 5.6
CATEGORIES= devel www java
MASTER_SITES= http://sonarsource.bintray.com/Distribution/sonarqube/
MAINTAINER= freebsd@dussan.org
COMMENT= Platform for continuous inspection of code quality
LICENSE= LGPL3
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libbiconv.so:converters/iconv
RUN_DEPENDS= javaservicewrapper:sysutils/javaservicewrapper
NO_ARCH= yes
NO_BUILD= yes
USE_RC_SUBR= ${PORTNAME}
USERS= www
GROUPS= www
USES= cpe dos2unix zip
CPE_VENDOR= sonarsource
DOS2UNIX_GLOB= *.properties *.conf
USE_JAVA= yes
JAVA_VERSION= 1.7+
SQ_FILE= sonar.sh
SQ_HOME= ${PREFIX}/${PORTNAME}
SQ_LOG_DIR= /var/log/${PORTNAME}
SQ_LOG_FILE= ${PORTNAME}.log
SQ_JSW= ${PREFIX}/lib/javaservicewrapper
SUB_LIST+= SQ_GROUP=${GROUPS} \
SQ_LOG_DIR=${SQ_LOG_DIR} \
SQ_LOG_FILE=${SQ_LOG_FILE} \
SQ_RC=${PORTNAME} \
SQ_RUN=${SQ_HOME}/bin/freebsd/${SQ_FILE} \
SQ_USER=${USERS}
PLIST_SUB+= SQ_GROUP=${GROUPS} \
SQ_HOME=${SQ_HOME} \
SQ_USER=${USERS}
OPTIONS_RADIO= SQL
OPTIONS_RADIO_SQL= MYSQL PGSQL
MYSQL_USE= mysql=yes
PGSQL_USES= pgsql
post-patch:
@${REINPLACE_CMD} -e 's|%%DIR%%|${SQ_HOME}|' \
-e 's|%%LIB%%|${SQ_JSW}|' \
-e 's|%%LOG%%|${SQ_LOG_DIR}/${SQ_LOG_FILE}|' \
-e 's|%%WRAPPER_JAR%%|${SQ_JSW}/lib/wrapper.jar|' \
${WRKSRC}/conf/wrapper.conf
do-install:
@${MKDIR} ${STAGEDIR}${SQ_HOME}
@(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${SQ_HOME})
@${MKDIR} ${STAGEDIR}${SQ_HOME}/bin/freebsd/lib
@${CP} ${STAGEDIR}${SQ_HOME}/bin/linux-x86-64/${SQ_FILE} \
${STAGEDIR}${SQ_HOME}/bin/freebsd
@${REINPLACE_CMD} -e 's|#RUN_AS_USER=|RUN_AS_USER=${USERS}|' \
-e 's|-p $$pid -o args|ww $$pid|' \
-e 's|=\"./wrapper\"|=\"${SQ_JSW}/bin/wrapper\"|' \
${STAGEDIR}${SQ_HOME}/bin/freebsd/${SQ_FILE}
@${MV} -f ${STAGEDIR}${SQ_HOME}/bin/freebsd/${SQ_FILE} \
${STAGEDIR}${SQ_HOME}/bin/freebsd/${SQ_FILE}.sample
@${MV} -f ${STAGEDIR}${SQ_HOME}/conf/sonar.properties \
${STAGEDIR}${SQ_HOME}/conf/sonar.properties.sample
@${MV} -f ${STAGEDIR}${SQ_HOME}/conf/wrapper.conf \
${STAGEDIR}${SQ_HOME}/conf/wrapper.conf.sample
@${RM} -drf ${STAGEDIR}${SQ_HOME}/bin/linux-x86-32
@${RM} -drf ${STAGEDIR}${SQ_HOME}/bin/linux-x86-64
@${RM} -drf ${STAGEDIR}${SQ_HOME}/bin/macosx-universal-64
@${RM} -drf ${STAGEDIR}${SQ_HOME}/bin/windows-x86-32
@${RM} -drf ${STAGEDIR}${SQ_HOME}/bin/windows-x86-64
.include <bsd.port.mk>

3
devel/sonarqube/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1465585877
SHA256 (sonarqube-5.6.zip) = 397c4eaf1d220cc2cef2075f709a4c50208dc91289e0234b0ae5954533f66994
SIZE (sonarqube-5.6.zip) = 118012667

View File

@ -0,0 +1,59 @@
--- conf/wrapper.conf.orig 2016-03-08 16:34:14 UTC
+++ conf/wrapper.conf
@@ -1,7 +1,7 @@
# Path to JVM executable. By default it must be available in PATH.
# Can be an absolute path, for example:
#wrapper.java.command=/path/to/my/jdk/bin/java
-wrapper.java.command=java
+wrapper.java.command=/usr/local/bin/java
#
@@ -14,12 +14,12 @@
#********************************************************************
wrapper.java.additional.1=-Djava.awt.headless=true
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
-wrapper.java.classpath.1=../../lib/jsw/*.jar
-wrapper.java.classpath.2=../../lib/*.jar
-wrapper.java.library.path.1=./lib
+wrapper.java.classpath.1=%%WRAPPER_JAR%%
+wrapper.java.classpath.2=%%DIR%%/lib/*.jar
+wrapper.java.library.path.1=%%LIB%%/lib
wrapper.app.parameter.1=org.sonar.application.App
-wrapper.java.initmemory=3
-wrapper.java.maxmemory=3
+wrapper.java.initmemory=512
+wrapper.java.maxmemory=512
#********************************************************************
# Wrapper Logs
@@ -27,7 +27,7 @@
wrapper.console.format=PM
wrapper.console.loglevel=INFO
-wrapper.logfile=../../logs/sonar.log
+wrapper.logfile=%%LOG%%
wrapper.logfile.format=M
wrapper.logfile.loglevel=INFO
@@ -35,11 +35,11 @@
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
-#wrapper.logfile.maxsize=0
+wrapper.logfile.maxsize=10m
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
-#wrapper.logfile.maxfiles=0
+wrapper.logfile.maxfiles=10
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
@@ -85,4 +85,4 @@
wrapper.disable_restarts=TRUE
wrapper.ping.timeout=0
wrapper.shutdown.timeout=3000
-wrapper.jvm_exit.timeout=3000
\ No newline at end of file
+wrapper.jvm_exit.timeout=3000

View File

@ -0,0 +1,15 @@
************************************************************************
Before start the SonarQube, prepare the Database and
the Web Server, when installing for the first time.
More information:
http://docs.sonarqube.org/display/SONAR/Installing
When upgrading the SonarQube, follow instructions:
http://docs.sonarqube.org/display/SONAR/Upgrading
To run the SonarQube from startup, add sonarqube_enable="YES"
in your /etc/rc.conf
************************************************************************

View File

@ -0,0 +1,65 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: %%SQ_RC%%
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Configuration settings for %%SQ_RC%% in /etc/rc.conf:
#
# %%SQ_RC%%_enable (bool):
# Set to "NO" by default.
# Set it to "YES" to enable %%SQ_RC%%.
#
. /etc/rc.subr
name="%%SQ_RC%%"
rcvar=%%SQ_RC%%_enable
extra_commands="restart status"
load_rc_config $name
%%SQ_RC%%_enable="${%%SQ_RC%%_enable:-"NO"}"
start_precmd="%%SQ_RC%%_prestart"
start_cmd="%%SQ_RC%%_start"
stop_cmd="%%SQ_RC%%_stop"
restart_cmd="%%SQ_RC%%_restart"
status_cmd="%%SQ_RC%%_status"
%%SQ_RC%%_prestart()
{
if [ ! -f "%%SQ_LOG_DIR%%/%%SQ_LOG_FILE%%" ]; then
mkdir -p "%%SQ_LOG_DIR%%"
touch "%%SQ_LOG_DIR%%/%%SQ_LOG_FILE%%"
chown -R "%%SQ_USER%%:%%SQ_GROUP%%" "%%SQ_LOG_DIR%%"
chmod 755 "%%SQ_LOG_DIR%%"
chmod 640 "%%SQ_LOG_DIR%%/%%SQ_LOG_FILE%%"
fi
}
%%SQ_RC%%_start()
{
%%SQ_RUN%% start
}
%%SQ_RC%%_stop()
{
%%SQ_RUN%% stop
}
%%SQ_RC%%_restart()
{
%%SQ_RUN%% restart
}
%%SQ_RC%%_status()
{
%%SQ_RUN%% status
}
run_rc_command "$1"

21
devel/sonarqube/pkg-descr Normal file
View File

@ -0,0 +1,21 @@
The SonarQube platform is an open source quality management platform,
dedicated to continuously analyzing and measuring the technical quality of
source code, from project portfolio down to the method level.
Features:
- Supports languages: Java, C/C++, Objective-C, C#, PHP, Flex, Groovy,
JavaScript, Python, PL/SQL, COBOL, etc.
- Can also be used in Android development.
- Offers reports on duplicated code, coding standards, unit tests, code
coverage, complex code, potential bugs, comments and design and
architecture.
- Records metrics history and provides evolution graphs ("time machine")
and differential views.
- Provides fully automated analyses: integrates with Maven, Ant, Gradle and
continuous integration tools (Atlassian Bamboo, Jenkins, Hudson, etc.).
- Integrates with the Eclipse development environment.
- Integrates with external tools: JIRA, Mantis, LDAP, Fortify, etc.
- Is expandable with the use of plugins.
- Implements the SQALE methodology to compute technical debt.
WWW: http://www.sonarqube.org/

2182
devel/sonarqube/pkg-plist Normal file

File diff suppressed because it is too large Load Diff