# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # artifactory # artifactory/files # artifactory/files/artifactory.in # artifactory/files/pkg-message.in # artifactory/pkg-descr # artifactory/pkg-plist # artifactory/Makefile # artifactory/distinfo # echo c - artifactory mkdir -p artifactory > /dev/null 2>&1 echo c - artifactory/files mkdir -p artifactory/files > /dev/null 2>&1 echo x - artifactory/files/artifactory.in sed 's/^X//' >artifactory/files/artifactory.in << '7a1121de8f29b02b809138a8ec7b9146' X#!/bin/sh X# X# artifactory startup script. X# X# $FreeBSD: artifactory 2014-04-15 raugustinus $ X# X# Make sure you have the artifactory user and artifactory home or set them below accordingly! X X# PROVIDE: artifactory X# REQUIRE: NETWORKING SERVERS X# KEYWORD: shutdown X X# Add the following lines to /etc/rc.conf to enable artifactory: X# artifactory_enable (bool): Set to "YES" to enable artifactory X# artifactory_args (str): Optional arguments to Artifactory X# artifactory_log_stdout (str) Artifactory log output stdout, filename. X# artifactory_log_stderr (str) Artifactory log output stderr, filename. X# X XARTIFACTORY_HOME=%%APP_HOME%% X X. /etc/rc.subr X Xname="artifactory" Xrcvar=artifactory_enable X Xload_rc_config $name X Xartifactory_enable="${artifactory_enable:-"NO"}" Xartifactory_log_stdout="${artifactory_log_stdout:-"${artifactory_logdir}/stdout.log"}" Xartifactory_log_stderr="${artifactory_log_stderr:-"${artifactory_logdir}/stderr.log"}" Xartifactory_args="${artifactory_args:-""}" Xartifactory_sleep="${artifactory_sleep:-"5"}" Xartifactory_kill9="${artifactory_kill9:-""}" Xartifactory_additional_killall="${artifactory_additional_killall:-""}" Xartifactory_user="artifactory" Xartifactory_logdir=$ARTIFACTORY_HOME/logs X Xstart_cmd="artifactory_start" Xstop_cmd="artifactory_stop" Xpidfile=%%PID_FILE%% X Xartifactory_start () X{ X if [ ! -d "${artifactory_logdir}" ] X then X install -d -o ${artifactory_user} ${artifactory_logdir} X fi X X echo "Starting artifactory." X 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 X X sleep ${artifactory_sleep} # let daemon(8) and sh(1) finish before executing pgrep(1) X pgrep -U ${artifactory_user} > ${pidfile} X chown ${artifactory_user} $pidfile X} X Xartifactory_stop () X{ X # Subvert the check_pid_file procname check. X if [ -f ${pidfile} ] X then X kill `cat ${pidfile}` X # Only if we aware that our setup can hangs, and only after trying simple kill, we can kill it hard way. X if [ ! -z "${artifactory_kill9}" ] X then X sleep ${artifactory_sleep} X kill -9 `cat ${pidfile}` X fi X # In some setups, Artifactory can spawn some child processess, which could prevent it from stopping, and freeing net ports. X # Let's blindly kill them all, since we are really know what we are doing. X if [ ! -z "${artifactory_additional_killall}" ] X then X sleep ${artifactory_sleep} X killall ${artifactory_additional_killall} X fi X fi X} X Xrun_rc_command "$1" 7a1121de8f29b02b809138a8ec7b9146 echo x - artifactory/files/pkg-message.in sed 's/^X//' >artifactory/files/pkg-message.in << '5cd45ade203762e4a35258a0f868a78d' X X=== INSTALLATION === X XArtifactory is now installed in %%APP_HOME%% X XYou may want to activate it in /etc/rc.conf: X X # echo %%APP_NAME%%_enable="YES" >> /etc/rc.conf X XNow, start Artifactory: X X # service %%APP_NAME%% start X XOnce Artifactory is started, point your web browser to: X Xhttp://localhost:8081/ X XArtifactory configuration files are located in %%APP_HOME%%/etc X XPlease don't forget to review and edit the files in the X%%APP_HOME%%/etc directory to suit your needs. X XFull documentation may be found at: X Xhttps://www.jfrog.com/confluence/display/RTF/Welcome+to+Artifactory X X=== DEINSTALLATION == X XIf, when, Artifactory is removed, and you no longer require the Xruntime database and configuration files, you can delete the Xfollowing directory. X X %%VARDIR%% X XPlease double-check before removing this directory as it contains Xthe database files that Artifactory requires if you do decide to Xre-install it again. X XEnjoy! 5cd45ade203762e4a35258a0f868a78d echo x - artifactory/pkg-descr sed 's/^X//' >artifactory/pkg-descr << 'b92a1c41a068b6637077f917edaec906' X XThe world's most advanced repository manager. Artifactory offers Xpowerful enterprise feature and fine-grained permission control behind Xa sleek and easy-to-use UI. X XWWW: https://www.jfrog.com/artifactory b92a1c41a068b6637077f917edaec906 echo x - artifactory/pkg-plist sed 's/^X//' >artifactory/pkg-plist << 'a56bcdb7d1fa4a11562efd8327fdee9d' X%%APP_HOME%%/COPYING X%%APP_HOME%%/COPYING.LESSER X%%APP_HOME%%/README.txt X%%APP_HOME%%/Third-Parties-Usage-About-Box.html X@mode 0755 X%%APP_HOME%%/bin/artifactory.sh X%%APP_HOME%%/bin/artifactoryctl X%%APP_HOME%%/bin/configure.mysql.sh X%%APP_HOME%%/bin/installService.sh X%%APP_HOME%%/bin/recover.backup.sh X%%APP_HOME%%/bin/uninstallService.sh X@mode X%%APP_HOME%%/backup X%%APP_HOME%%/data X%%APP_HOME%%/etc X%%APP_HOME%%/logs X%%APP_HOME%%/misc/db/createdb/createdb_mssql.sql X%%APP_HOME%%/misc/db/createdb/createdb_mssqlBlob.sql X%%APP_HOME%%/misc/db/createdb/createdb_mssqlRecreateBlob.sql X%%APP_HOME%%/misc/db/createdb/createdb_mysql.sql X%%APP_HOME%%/misc/db/mssql.properties X%%APP_HOME%%/misc/db/mysql.properties X%%APP_HOME%%/misc/db/oracle.properties X%%APP_HOME%%/misc/db/postgresql.properties X%%APP_HOME%%/misc/ha/ha-node.properties.template X%%APP_HOME%%/misc/service/artifactory X%%APP_HOME%%/misc/service/setenv.sh X%%APP_HOME%%/misc/tomcat/NGNIX.txt X%%APP_HOME%%/misc/tomcat/artifactory.httpd.conf X%%APP_HOME%%/misc/tomcat/artifactory.xml X%%APP_HOME%%/misc/tomcat/index.html X%%APP_HOME%%/misc/tomcat/logging.properties X%%APP_HOME%%/misc/tomcat/server.xml X%%APP_HOME%%/misc/tomcat/web.xml X%%APP_HOME%%/tomcat/LICENSE X%%APP_HOME%%/tomcat/NOTICE X%%APP_HOME%%/tomcat/RELEASE-NOTES X%%APP_HOME%%/tomcat/RUNNING.txt X%%APP_HOME%%/tomcat/bin/bootstrap.jar X%%APP_HOME%%/tomcat/bin/catalina-tasks.xml X%%APP_HOME%%/tomcat/bin/commons-daemon-native.tar.gz X%%APP_HOME%%/tomcat/bin/commons-daemon.jar X%%APP_HOME%%/tomcat/bin/tomcat-juli.jar X%%APP_HOME%%/tomcat/bin/tomcat-native.tar.gz X@mode 0755 X%%APP_HOME%%/tomcat/bin/catalina.sh X%%APP_HOME%%/tomcat/bin/configtest.sh X%%APP_HOME%%/tomcat/bin/daemon.sh X%%APP_HOME%%/tomcat/bin/digest.sh X%%APP_HOME%%/tomcat/bin/setclasspath.sh X%%APP_HOME%%/tomcat/bin/shutdown.sh X%%APP_HOME%%/tomcat/bin/startup.sh X%%APP_HOME%%/tomcat/bin/tool-wrapper.sh X%%APP_HOME%%/tomcat/bin/version.sh X@mode X%%APP_HOME%%/tomcat/conf/Catalina/localhost/artifactory.xml X%%APP_HOME%%/tomcat/conf/catalina.policy X%%APP_HOME%%/tomcat/conf/catalina.properties X%%APP_HOME%%/tomcat/conf/logging.properties X%%APP_HOME%%/tomcat/conf/server.xml X%%APP_HOME%%/tomcat/conf/web.xml X%%APP_HOME%%/tomcat/lib/annotations-api.jar X%%APP_HOME%%/tomcat/lib/catalina.jar X%%APP_HOME%%/tomcat/lib/el-api.jar X%%APP_HOME%%/tomcat/lib/servlet-api.jar X%%APP_HOME%%/tomcat/lib/tomcat-api.jar X%%APP_HOME%%/tomcat/lib/tomcat-coyote.jar X%%APP_HOME%%/tomcat/lib/tomcat-jni.jar X%%APP_HOME%%/tomcat/lib/tomcat-util-scan.jar X%%APP_HOME%%/tomcat/lib/tomcat-util.jar X%%APP_HOME%%/tomcat/logs X%%APP_HOME%%/tomcat/temp X%%APP_HOME%%/tomcat/webapps X%%APP_HOME%%/tomcat/work X%%APP_HOME%%/webapps/artifactory.war X@owner artifactory X@group artifactory X%%VARDIR%%/tomcat/webapps/ROOT/index.html X%%VARDIR%%/etc/artifactory.config.xml X%%VARDIR%%/etc/artifactory.system.properties X%%VARDIR%%/etc/mimetypes.xml X%%VARDIR%%/etc/logback.xml X@dir %%VARDIR%%/tomcat/work X@dir %%VARDIR%%/tomcat/webapps/ROOT X@dir %%VARDIR%%/tomcat/webapps X@dir %%VARDIR%%/tomcat/temp X@dir %%VARDIR%%/tomcat/logs/catalina X@dir %%VARDIR%%/tomcat/logs X@dir %%VARDIR%%/tomcat X@dir %%VARDIR%%/logs X@dir %%VARDIR%%/etc X@dir %%VARDIR%%/data X@dir %%VARDIR%%/backup X@dir %%VARDIR%% X@owner X@group a56bcdb7d1fa4a11562efd8327fdee9d echo x - artifactory/Makefile sed 's/^X//' >artifactory/Makefile << '40e06c54c18b8b1763aa00ee67c6d3f0' X# $FreeBSD$ X XPORTNAME= artifactory XPORTVERSION= 4.2.2 XCATEGORIES= devel java XMASTER_SITES= https://bintray.com/artifact/download/jfrog/artifactory/ XDISTNAME= jfrog-${PORTNAME}-oss-${PORTVERSION} X XMAINTAINER= dharrigan@gmail.com XCOMMENT= Universal Artifact Repository Manager X XLICENSE= GPLv3 LGPL3 APACHE20 XLICENSE_COMB= multi XLICENSE_FILE= ${WRKSRC}/COPYING ${WRKSRC}/COPYING ${WRKSRC}/tomcat/LICENSE X XRUN_DEPENDS= bash:${PORTSDIR}/shells/bash X XWRKSRC= ${WRKDIR}/${PORTNAME}-oss-${PORTVERSION} X XNO_ARCH= yes XUSE_JAVA= yes XUSES= shebangfix zip XSHEBANG_FILES= bin/artifactory.sh XNO_BUILD= yes XJAVA_VERSION= 1.8+ XJAVA_VENDOR= openjdk XONLY_FOR_ARCHS= i386 amd64 XUSE_RC_SUBR= ${PORTNAME} X XAPP_NAME= ${PORTNAME} XAPP_HOME?= ${PORTNAME} XPID_FILE?= /var/run/${PORTNAME}.pid XVARDIR= /var/${PORTNAME} X XUSERS= artifactory XGROUPS= artifactory X XSUB_LIST= APP_HOME=${PREFIX}/${APP_HOME} \ X APP_NAME=${APP_NAME} \ X PID_FILE=${PID_FILE} \ X VARDIR=${VARDIR} X XSUB_FILES= pkg-message \ X XPLIST_SUB= APP_HOME=${APP_HOME} \ X VARDIR=${VARDIR} X Xdo-install: X.for f in artifactory-service.exe artifactory.bat artifactory.default installService.bat \ X uninstallService.bat X ${RM} ${WRKSRC}/bin/${f} X.endfor X ${RM} ${WRKSRC}/tomcat/bin/*.bat X X ${MKDIR} ${STAGEDIR}${PREFIX}/${APP_HOME} X (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${APP_HOME}) X X ${MKDIR} ${STAGEDIR}/${VARDIR}/tomcat/logs/catalina X ${LN} -sf ${VARDIR}/tomcat/logs/catalina ${STAGEDIR}${PREFIX}/${APP_HOME}/tomcat/logs X X.for d in etc logs X ${MV} ${STAGEDIR}${PREFIX}/${APP_HOME}/${d} ${STAGEDIR}/${VARDIR} X ${LN} -sf ${VARDIR}/${d} ${STAGEDIR}${PREFIX}/${APP_HOME}/${d} X.endfor X X.for d in temp webapps work X ${MV} ${STAGEDIR}${PREFIX}/${APP_HOME}/tomcat/${d} ${STAGEDIR}/${VARDIR}/tomcat X ${LN} -sf ${VARDIR}/tomcat/${d} ${STAGEDIR}${PREFIX}/${APP_HOME}/tomcat/${d} X.endfor X X.for d in data backup X ${MKDIR} ${STAGEDIR}/${VARDIR}/${d} X ${LN} -sf ${VARDIR}/${d} ${STAGEDIR}${PREFIX}/${APP_HOME}/${d} X.endfor X X.include 40e06c54c18b8b1763aa00ee67c6d3f0 echo x - artifactory/distinfo sed 's/^X//' >artifactory/distinfo << 'dd54aca0bd1f6b8fcefdda6bcf4fd924' XSHA256 (jfrog-artifactory-oss-4.2.2.zip) = 4f180c0157875462e910b8acbe0c79b3427c38a5e5c90a1900d357958360e39f XSIZE (jfrog-artifactory-oss-4.2.2.zip) = 35547422 dd54aca0bd1f6b8fcefdda6bcf4fd924 exit