debian swirl logo

Back to the packages list jenkins

#!/usr/bin/make -f

#export DH_VERBOSE=1

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/maven.mk

JAVA_HOME := /usr/lib/jvm/default-java
# Parse upstream version without +dfsg for source download+
DEB_UPSTREAM_VERSION= $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+).*,\1,p')
DEB_MAVEN_BUILD_TARGET := install
DEB_MAVEN_ARGS := -e -Dbuild.version="$(DEB_UPSTREAM_VERSION)"
DEB_MAVEN_INSTALL_TO_USJ := false

# Debian package version use daemon to control jenkins processes
# Ubuntu does not need this - managed by upstart
ifeq ($(shell dpkg-vendor --derives-from ubuntu || echo debian ),debian)
DEB_DH_GENCONTROL_ARGS:= -- -Tdebian/debian_control_vars
endif

# Generate POM file for plugins
debian/plugin-debian.pom: debian/plugin-debian.pom.in
		sed -e "s|__VERSION__|$(DEB_UPSTREAM_VERSION)|g" $< > debian/plugin-debian.pom

# Install the POM for plugin-parent manually as not part
# of main build - manually installed as not managed by 
# m-d-h as breaks build elements for re-use.
binary-post-install/libjenkins-plugin-parent-java:: debian/plugin-debian.pom
		dh_install -plibjenkins-plugin-parent-java debian/plugin-debian.pom \
			usr/share/maven-repo/org/jenkins-ci/plugins/plugin/debian

# Sort out MANIFEST.MF entries in jenkins cli .jar files
# and create handy links for script wrapper
binary-post-install/jenkins-cli::
		dh_link -pjenkins-cli usr/share/jenkins/cli/java/cli-$(DEB_UPSTREAM_VERSION)-jar-with-dependencies.jar \
			usr/share/jenkins/cli/java/cli.jar
		jh_classpath -pjenkins-cli
		jh_manifest -pjenkins-cli

# Install POM files directly
binary-post-install/libjenkins-java::
		mh_installpoms -plibjenkins-java

# Tidy up any upstart configuration files lying around
clean::
		[ ! -f dummy.keystore ] || rm dummy.keystore

get-orig-source:
		uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
		mv ../jenkins_$(DEB_UPSTREAM_VERSION).orig.tar.gz \
        ../jenkins_$(DEB_UPSTREAM_VERSION)+dfsg.orig.tar.gz

before-mvn-build:: dummy.keystore
	# Purge out links relating to jenkins from the copy of the maven repo
	# fixes issue with circular dependency and the need to use the install
	# maven target
		for module in jenkins-core cli pom jenkins-war; do \
			find debian/maven-repo/org/jenkins-ci/main/$${module} -type l -delete || true ;\
		done

dummy.keystore:
	keytool -genkeypair -dname "cn= Jenkins, ou=Jenkins Project, o=Debian, c=US" \
    	-alias jenkins -keypass jenkins -keystore dummy.keystore \
      	-storepass jenkins -validity 3650

Builds:

jenkins-cli
jenkins ci command line interface
jenkins-common
jenkins common java components and web application
jenkins
continuous integration and job scheduling server
jenkins-external-job-monitor
jenkins ci external job monitoring
jenkins-slave
jenkins slave node helper
jenkins-tomcat
jenkins ci on tomcat 6
libjenkins-java
jenkins ci core java libraries
libjenkins-plugin-parent-java
jenkins plugin parent maven pom