diff options
author | Thomas Zander <riggs@FreeBSD.org> | 2015-11-09 20:31:41 +0000 |
---|---|---|
committer | Thomas Zander <riggs@FreeBSD.org> | 2015-11-09 20:31:41 +0000 |
commit | 46cb296fb23d52c6a0d6f234d7e54b88e654fb63 (patch) | |
tree | 1c05824195712cd6f2defa2f051bb72e8e8a7807 /devel | |
parent | 60bd7c93a3e2b57379addbc5ed2961d59974daac (diff) |
Notes
Diffstat (limited to 'devel')
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/artifactory/Makefile | 76 | ||||
-rw-r--r-- | devel/artifactory/distinfo | 2 | ||||
-rw-r--r-- | devel/artifactory/files/artifactory.in | 80 | ||||
-rw-r--r-- | devel/artifactory/files/pkg-message.in | 39 | ||||
-rw-r--r-- | devel/artifactory/pkg-descr | 6 | ||||
-rw-r--r-- | devel/artifactory/pkg-plist | 97 |
7 files changed, 301 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index f0278a163a1b..8cbb53d7be0c 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -98,6 +98,7 @@ SUBDIR += arm-none-eabi-gcc492 SUBDIR += aros-sdk SUBDIR += art + SUBDIR += artifactory SUBDIR += as31 SUBDIR += asl SUBDIR += asmutils diff --git a/devel/artifactory/Makefile b/devel/artifactory/Makefile new file mode 100644 index 000000000000..14b7ff57dc38 --- /dev/null +++ b/devel/artifactory/Makefile @@ -0,0 +1,76 @@ +# $FreeBSD$ + +PORTNAME= artifactory +PORTVERSION= 4.2.2 +CATEGORIES= devel java +MASTER_SITES= https://bintray.com/artifact/download/jfrog/artifactory/ +DISTNAME= jfrog-${PORTNAME}-oss-${PORTVERSION} + +MAINTAINER= dharrigan@gmail.com +COMMENT= Universal Artifact Repository Manager + +LICENSE= GPLv3 LGPL3 APACHE20 +LICENSE_COMB= multi +LICENSE_FILE= ${WRKSRC}/COPYING ${WRKSRC}/COPYING ${WRKSRC}/tomcat/LICENSE + +RUN_DEPENDS= bash:${PORTSDIR}/shells/bash + +WRKSRC= ${WRKDIR}/${PORTNAME}-oss-${PORTVERSION} + +NO_ARCH= yes +USE_JAVA= yes +USES= shebangfix zip +SHEBANG_FILES= bin/artifactory.sh +NO_BUILD= yes +JAVA_VERSION= 1.8+ +JAVA_VENDOR= openjdk +ONLY_FOR_ARCHS= i386 amd64 +USE_RC_SUBR= ${PORTNAME} + +APP_NAME= ${PORTNAME} +APP_HOME?= ${PORTNAME} +PID_FILE?= /var/run/${PORTNAME}.pid +VARDIR= /var/${PORTNAME} + +USERS= artifactory +GROUPS= artifactory + +SUB_LIST= APP_HOME=${PREFIX}/${APP_HOME} \ + APP_NAME=${APP_NAME} \ + PID_FILE=${PID_FILE} \ + VARDIR=${VARDIR} + +SUB_FILES= pkg-message \ + +PLIST_SUB= APP_HOME=${APP_HOME} \ + VARDIR=${VARDIR} + +do-install: +.for f in artifactory-service.exe artifactory.bat installService.bat \ + uninstallService.bat + ${RM} ${WRKSRC}/bin/${f} +.endfor + ${RM} ${WRKSRC}/tomcat/bin/*.bat + + ${MKDIR} ${STAGEDIR}${PREFIX}/${APP_HOME} + (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${APP_HOME}) + + ${MKDIR} ${STAGEDIR}/${VARDIR}/tomcat/logs/catalina + ${LN} -sf ${VARDIR}/tomcat/logs/catalina ${STAGEDIR}${PREFIX}/${APP_HOME}/tomcat/logs + +.for d in etc logs + ${MV} ${STAGEDIR}${PREFIX}/${APP_HOME}/${d} ${STAGEDIR}/${VARDIR} + ${LN} -sf ${VARDIR}/${d} ${STAGEDIR}${PREFIX}/${APP_HOME}/${d} +.endfor + +.for d in temp webapps work + ${MV} ${STAGEDIR}${PREFIX}/${APP_HOME}/tomcat/${d} ${STAGEDIR}/${VARDIR}/tomcat + ${LN} -sf ${VARDIR}/tomcat/${d} ${STAGEDIR}${PREFIX}/${APP_HOME}/tomcat/${d} +.endfor + +.for d in data backup + ${MKDIR} ${STAGEDIR}/${VARDIR}/${d} + ${LN} -sf ${VARDIR}/${d} ${STAGEDIR}${PREFIX}/${APP_HOME}/${d} +.endfor + +.include <bsd.port.mk> diff --git a/devel/artifactory/distinfo b/devel/artifactory/distinfo new file mode 100644 index 000000000000..60d4072b6bca --- /dev/null +++ b/devel/artifactory/distinfo @@ -0,0 +1,2 @@ +SHA256 (jfrog-artifactory-oss-4.2.2.zip) = 4f180c0157875462e910b8acbe0c79b3427c38a5e5c90a1900d357958360e39f +SIZE (jfrog-artifactory-oss-4.2.2.zip) = 35547422 diff --git a/devel/artifactory/files/artifactory.in b/devel/artifactory/files/artifactory.in new file mode 100644 index 000000000000..3c8e2f6a185c --- /dev/null +++ b/devel/artifactory/files/artifactory.in @@ -0,0 +1,80 @@ +#!/bin/sh +# +# artifactory startup script. +# +# $FreeBSD$ +# +# Make sure you have the artifactory user and artifactory home or set them below accordingly! + +# PROVIDE: artifactory +# REQUIRE: NETWORKING SERVERS +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable artifactory: +# artifactory_enable (bool): Set to "YES" to enable artifactory +# artifactory_args (str): Optional arguments to Artifactory +# artifactory_log_stdout (str) Artifactory log output stdout, filename. +# artifactory_log_stderr (str) Artifactory log output stderr, filename. +# + +ARTIFACTORY_HOME=%%APP_HOME%% + +. /etc/rc.subr + +name="artifactory" +rcvar=artifactory_enable + +load_rc_config $name + +artifactory_enable="${artifactory_enable:-"NO"}" +artifactory_log_stdout="${artifactory_log_stdout:-"${artifactory_logdir}/stdout.log"}" +artifactory_log_stderr="${artifactory_log_stderr:-"${artifactory_logdir}/stderr.log"}" +artifactory_args="${artifactory_args:-""}" +artifactory_sleep="${artifactory_sleep:-"5"}" +artifactory_kill9="${artifactory_kill9:-""}" +artifactory_additional_killall="${artifactory_additional_killall:-""}" +artifactory_user="artifactory" +artifactory_logdir=$ARTIFACTORY_HOME/logs + +start_cmd="artifactory_start" +stop_cmd="artifactory_stop" +pidfile=%%PID_FILE%% + +artifactory_start () +{ + if [ ! -d "${artifactory_logdir}" ] + then + install -d -o ${artifactory_user} ${artifactory_logdir} + fi + + echo "Starting artifactory." + daemon -u ${artifactory_user} ${ARTIFACTORY_HOME}/bin/artifactory.sh ${artifactory_args} >> ${artifactory_log_stdout} 2>> ${artifactory_log_stderr} >> ${artifactory_logdir}/boot.log 2>> ${artifactory_logdir}/boot.log + + sleep ${artifactory_sleep} # let daemon(8) and sh(1) finish before executing pgrep(1) + pgrep -U ${artifactory_user} > ${pidfile} + chown ${artifactory_user} $pidfile +} + +artifactory_stop () +{ + # Subvert the check_pid_file procname check. + if [ -f ${pidfile} ] + then + kill `cat ${pidfile}` + # Only if we aware that our setup can hangs, and only after trying simple kill, we can kill it hard way. + if [ ! -z "${artifactory_kill9}" ] + then + sleep ${artifactory_sleep} + kill -9 `cat ${pidfile}` + fi + # In some setups, Artifactory can spawn some child processess, which could prevent it from stopping, and freeing net ports. + # Let's blindly kill them all, since we are really know what we are doing. + if [ ! -z "${artifactory_additional_killall}" ] + then + sleep ${artifactory_sleep} + killall ${artifactory_additional_killall} + fi + fi +} + +run_rc_command "$1" diff --git a/devel/artifactory/files/pkg-message.in b/devel/artifactory/files/pkg-message.in new file mode 100644 index 000000000000..580ed8136012 --- /dev/null +++ b/devel/artifactory/files/pkg-message.in @@ -0,0 +1,39 @@ + +=== INSTALLATION === + +Artifactory is now installed in %%APP_HOME%% + +You may want to activate it in /etc/rc.conf: + + # echo %%APP_NAME%%_enable="YES" >> /etc/rc.conf + +Now, start Artifactory: + + # service %%APP_NAME%% start + +Once Artifactory is started, point your web browser to: + +http://localhost:8081/ + +Artifactory configuration files are located in %%APP_HOME%%/etc + +Please don't forget to review and edit the files in the +%%APP_HOME%%/etc directory to suit your needs. + +Full documentation may be found at: + +https://www.jfrog.com/confluence/display/RTF/Welcome+to+Artifactory + +=== DEINSTALLATION == + +If, when, Artifactory is removed, and you no longer require the +runtime database and configuration files, you can delete the +following directory: + + %%VARDIR%% + +Please double-check before removing this directory as it contains +the database files that Artifactory requires if you do decide to +re-install it again. + +Enjoy! diff --git a/devel/artifactory/pkg-descr b/devel/artifactory/pkg-descr new file mode 100644 index 000000000000..6b3e74ee1d38 --- /dev/null +++ b/devel/artifactory/pkg-descr @@ -0,0 +1,6 @@ + +The world's most advanced repository manager. Artifactory offers +powerful enterprise feature and fine-grained permission control behind +a sleek and easy-to-use UI. + +WWW: https://www.jfrog.com/artifactory diff --git a/devel/artifactory/pkg-plist b/devel/artifactory/pkg-plist new file mode 100644 index 000000000000..dbea87facdc1 --- /dev/null +++ b/devel/artifactory/pkg-plist @@ -0,0 +1,97 @@ +%%APP_HOME%%/COPYING +%%APP_HOME%%/COPYING.LESSER +%%APP_HOME%%/README.txt +%%APP_HOME%%/Third-Parties-Usage-About-Box.html +@mode 0755 +%%APP_HOME%%/bin/artifactory.default +%%APP_HOME%%/bin/artifactory.sh +%%APP_HOME%%/bin/artifactoryctl +%%APP_HOME%%/bin/configure.mysql.sh +%%APP_HOME%%/bin/installService.sh +%%APP_HOME%%/bin/recover.backup.sh +%%APP_HOME%%/bin/uninstallService.sh +@mode +%%APP_HOME%%/backup +%%APP_HOME%%/data +%%APP_HOME%%/etc +%%APP_HOME%%/logs +%%APP_HOME%%/misc/db/createdb/createdb_mssql.sql +%%APP_HOME%%/misc/db/createdb/createdb_mssqlBlob.sql +%%APP_HOME%%/misc/db/createdb/createdb_mssqlRecreateBlob.sql +%%APP_HOME%%/misc/db/createdb/createdb_mysql.sql +%%APP_HOME%%/misc/db/mssql.properties +%%APP_HOME%%/misc/db/mysql.properties +%%APP_HOME%%/misc/db/oracle.properties +%%APP_HOME%%/misc/db/postgresql.properties +%%APP_HOME%%/misc/ha/ha-node.properties.template +%%APP_HOME%%/misc/service/artifactory +%%APP_HOME%%/misc/service/setenv.sh +%%APP_HOME%%/misc/tomcat/NGNIX.txt +%%APP_HOME%%/misc/tomcat/artifactory.httpd.conf +%%APP_HOME%%/misc/tomcat/artifactory.xml +%%APP_HOME%%/misc/tomcat/index.html +%%APP_HOME%%/misc/tomcat/logging.properties +%%APP_HOME%%/misc/tomcat/server.xml +%%APP_HOME%%/misc/tomcat/web.xml +%%APP_HOME%%/tomcat/LICENSE +%%APP_HOME%%/tomcat/NOTICE +%%APP_HOME%%/tomcat/RELEASE-NOTES +%%APP_HOME%%/tomcat/RUNNING.txt +%%APP_HOME%%/tomcat/bin/bootstrap.jar +%%APP_HOME%%/tomcat/bin/catalina-tasks.xml +%%APP_HOME%%/tomcat/bin/commons-daemon-native.tar.gz +%%APP_HOME%%/tomcat/bin/commons-daemon.jar +%%APP_HOME%%/tomcat/bin/tomcat-juli.jar +%%APP_HOME%%/tomcat/bin/tomcat-native.tar.gz +@mode 0755 +%%APP_HOME%%/tomcat/bin/catalina.sh +%%APP_HOME%%/tomcat/bin/configtest.sh +%%APP_HOME%%/tomcat/bin/daemon.sh +%%APP_HOME%%/tomcat/bin/digest.sh +%%APP_HOME%%/tomcat/bin/setclasspath.sh +%%APP_HOME%%/tomcat/bin/shutdown.sh +%%APP_HOME%%/tomcat/bin/startup.sh +%%APP_HOME%%/tomcat/bin/tool-wrapper.sh +%%APP_HOME%%/tomcat/bin/version.sh +@mode +%%APP_HOME%%/tomcat/conf/Catalina/localhost/artifactory.xml +%%APP_HOME%%/tomcat/conf/catalina.policy +%%APP_HOME%%/tomcat/conf/catalina.properties +%%APP_HOME%%/tomcat/conf/logging.properties +%%APP_HOME%%/tomcat/conf/server.xml +%%APP_HOME%%/tomcat/conf/web.xml +%%APP_HOME%%/tomcat/lib/annotations-api.jar +%%APP_HOME%%/tomcat/lib/catalina.jar +%%APP_HOME%%/tomcat/lib/el-api.jar +%%APP_HOME%%/tomcat/lib/servlet-api.jar +%%APP_HOME%%/tomcat/lib/tomcat-api.jar +%%APP_HOME%%/tomcat/lib/tomcat-coyote.jar +%%APP_HOME%%/tomcat/lib/tomcat-jni.jar +%%APP_HOME%%/tomcat/lib/tomcat-util-scan.jar +%%APP_HOME%%/tomcat/lib/tomcat-util.jar +%%APP_HOME%%/tomcat/logs +%%APP_HOME%%/tomcat/temp +%%APP_HOME%%/tomcat/webapps +%%APP_HOME%%/tomcat/work +%%APP_HOME%%/webapps/artifactory.war +@owner artifactory +@group artifactory +%%VARDIR%%/tomcat/webapps/ROOT/index.html +%%VARDIR%%/etc/artifactory.config.xml +%%VARDIR%%/etc/artifactory.system.properties +%%VARDIR%%/etc/mimetypes.xml +%%VARDIR%%/etc/logback.xml +@dir %%VARDIR%%/tomcat/work +@dir %%VARDIR%%/tomcat/webapps/ROOT +@dir %%VARDIR%%/tomcat/webapps +@dir %%VARDIR%%/tomcat/temp +@dir %%VARDIR%%/tomcat/logs/catalina +@dir %%VARDIR%%/tomcat/logs +@dir %%VARDIR%%/tomcat +@dir %%VARDIR%%/logs +@dir %%VARDIR%%/etc +@dir %%VARDIR%%/data +@dir %%VARDIR%%/backup +@dir %%VARDIR%% +@owner +@group |