Commit 2296e9a1 authored by swills's avatar swills
Browse files

- Create a port for the long term stable version of Jenkins, based on the

  existing Jenkins port
parent 3471395b
......@@ -878,6 +878,7 @@
SUBDIR += jcmdline
SUBDIR += jech-dht
SUBDIR += jenkins
SUBDIR += jenkins-lts
SUBDIR += jep
SUBDIR += jgoodies-common
SUBDIR += jiic
......
# $FreeBSD$
PORTNAME= jenkins
PORTVERSION= 1.532.1
CATEGORIES= devel java
MASTER_SITES= http://mirrors.jenkins-ci.org/war-stable/${PORTVERSION}/
PKGNAMESUFFIX= -lts
DISTNAME= jenkins
EXTRACT_SUFX= .war
DIST_SUBDIR= ${PORTNAME}/${PORTVERSION}
EXTRACT_ONLY=
MAINTAINER= swills@FreeBSD.org
COMMENT= Open-source continuous integration server
LICENSE= MIT
CONFLICTS= jenkins-[0-9]*
USE_JAVA= yes
JAVA_VERSION= 1.6+
FETCH_ARGS= -Fpr
NO_BUILD= yes
USE_RC_SUBR= jenkins
JENKINS_HOME?= ${PREFIX}/jenkins
JENKINS_USER?= jenkins
JENKINS_GROUP?= jenkins
JENKINS_LOG_FILE?= /var/log/jenkins.log
.if ${JENKINS_USER} == "jenkins"
USERS= jenkins
.endif
.if ${JENKINS_GROUP} == "jenkins"
GROUPS= jenkins
.endif
PLIST_FILES= %%DATADIR%%/${DISTNAME}${EXTRACT_SUFX}
PLIST_DIRS= %%DATADIR%%
PLIST_DIRSTRY= jenkins
SUB_LIST+= JENKINS_HOME=${JENKINS_HOME} JENKINS_USER=${JENKINS_USER} JENKINS_GROUP=${JENKINS_GROUP} JAVA_HOME=${JAVA_HOME} JENKINS_LOG_FILE=${JENKINS_LOG_FILE}
.include <bsd.port.pre.mk>
do-install:
${MKDIR} ${STAGEDIR}${DATADIR} ${STAGEDIR}${JENKINS_HOME}
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX} ${STAGEDIR}${DATADIR}
.include <bsd.port.post.mk>
SHA256 (jenkins/1.532.1/jenkins.war) = 624bb5711aec69fa7e5524ec526fddd82099845acdb825c4a28232c4f6caf514
SIZE (jenkins/1.532.1/jenkins.war) = 65405459
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: jenkins
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Configuration settings for jenkins in /etc/rc.conf:
#
# jenkins_enable (bool):
# Set to "NO" by default.
# Set it to "YES" to enable jenkins
#
# jenkins_args (str):
# Extra arguments passed to start command
#
# jenkins_home (str)
# Set to "%%JENKINS_HOME%%" by default.
# Set the JENKINS_HOME variable for jenkins process
#
# jenkins_java_home (str):
# Set to "%%JAVA_HOME%%" by default.
# Set the Java virtual machine to run jenkins
#
# jenkins_java_opts (str):
# Set to "" by default.
# Java VM args to use.
#
# jenkins_user (str):
# Set to "%%JENKINS_USER%%" by default.
# User to run jenkins as.
#
# jenkins_group (str):
# Set to "%%JENKINS_GROUP%%" by default.
# Group for data file ownership.
#
# jenkins_log_file (str):
# Set to "%%JENKINS_LOG_FILE%%" by default.
# Log file location.
#
. /etc/rc.subr
name="jenkins"
rcvar=jenkins_enable
load_rc_config "${name}"
: ${jenkins_enable="NO"}
: ${jenkins_home="%%JENKINS_HOME%%"}
: ${jenkins_args="--webroot=${jenkins_home}/war --httpListenAddress=127.0.0.1 --httpPort=8180 --ajp13ListenAddress=127.0.0.1 --ajp13Port=8009 --prefix=/jenkins"}
: ${jenkins_java_home="%%JAVA_HOME%%"}
: ${jenkins_user="%%JENKINS_USER%%"}
: ${jenkins_group="%%JENKINS_GROUP%%"}
: ${jenkins_log_file="%%JENKINS_LOG_FILE%%"}
pidfile="/var/run/jenkins/jenkins.pid"
command="/usr/sbin/daemon"
java_cmd="${jenkins_java_home}/bin/java"
procname="${java_cmd}"
command_args="-p ${pidfile} ${java_cmd} -DJENKINS_HOME=${jenkins_home} ${jenkins_java_opts} -jar %%DATADIR%%/jenkins.war ${jenkins_args} > ${jenkins_log_file} 2>&1"
required_files="${java_cmd}"
start_precmd="jenkins_prestart"
start_cmd="jenkins_start"
jenkins_prestart() {
if [ ! -f "${jenkins_log_file}" ]; then
touch "${jenkins_log_file}"
chown "${jenkins_user}:${jenkins_group}" "${jenkins_log_file}"
chmod 640 "${jenkins_log_file}"
fi
if [ ! -d "/var/run/jenkins" ]; then
install -d -o "${jenkins_user}" -g "${jenkins_group}" -m 750 "/var/run/jenkins"
fi
}
jenkins_start()
{
check_startmsgs && echo "Starting ${name}."
su -l ${jenkins_user} -c "exec ${command} ${command_args} ${rc_arg}"
}
run_rc_command "$1"
In a nutshell Jenkins CI is the leading open-source continuous integration
server. Built with Java, it provides over 300 plugins to support building
and testing virtually any project.
WWW: http://jenkins-ci.org/
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment