Permalink
Browse files

Initial commit of Jenkins 1.440

  • Loading branch information...
0 parents commit 162e96c172a50cb4b6d4ef82f3ff51e4dbd22dd0 @dnaeon committed Dec 9, 2011
Showing with 140 additions and 0 deletions.
  1. +51 −0 Makefile
  2. +2 −0 distinfo
  3. +82 −0 files/jenkins.in
  4. +5 −0 pkg-descr
@@ -0,0 +1,51 @@
+# New ports collection makefile for: jenkins
+# Date created: 2011-03-03
+# Whom: Li-Wen Hsu <lwhsu@FreeBSD.org>
+#
+# $FreeBSD: ports/devel/jenkins/Makefile,v 1.13 2011/11/24 09:20:02 lwhsu Exp $
+#
+
+PORTNAME= jenkins
+PORTVERSION= 1.440
+CATEGORIES= devel java
+MASTER_SITES= http://mirrors.jenkins-ci.org/war/${PORTVERSION}/
+DISTNAME= jenkins
+EXTRACT_SUFX= .war
+DIST_SUBDIR= ${PORTNAME}/${PORTVERSION}
+EXTRACT_ONLY=
+
+MAINTAINER= lwhsu@FreeBSD.org
+COMMENT= Open-source continuous integration server
+
+USE_JAVA= yes
+JAVA_VERSION= 1.5+
+
+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} "${DATADIR}"
+ ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX} ${DATADIR}/
+
+.include <bsd.port.post.mk>
@@ -0,0 +1,2 @@
+SHA256 (jenkins/1.440/jenkins.war) = 02a07c2a956743de6bd0f6edef90fd1576a096a988536a4c10a110baa5c4db12
+SIZE (jenkins/1.440/jenkins.war) = 42575262
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+# $FreeBSD: ports/devel/jenkins/files/jenkins.in,v 1.2 2011/04/29 11:57:53 kuriyama Exp $
+#
+# 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=`set_rcvar`
+
+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 --logfile=${jenkins_log_file} ${jenkins_args}"
+required_files="${java_cmd}"
+
+start_precmd="jenkins_prestart"
+
+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 "${jenkins_home}" ]; then
+ install -d -o "${jenkins_user}" -g "${jenkins_group}" -m 750 "${jenkins_home}"
+ fi
+ if [ ! -d "/var/run/jenkins" ]; then
+ install -d -o "${jenkins_user}" -g "${jenkins_group}" -m 750 "/var/run/jenkins"
+ fi
+}
+
+run_rc_command "$1"
@@ -0,0 +1,5 @@
+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/

0 comments on commit 162e96c

Please sign in to comment.