debian swirl logo

Back to the packages list maven2-core

#!/usr/bin/make -f

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

PACKAGE              := $(DEB_SOURCE_PACKAGE)
VERSION              := $(DEB_UPSTREAM_VERSION)
BUILD_VERSION        := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/[^-]*-//')
JAVA_HOME            := /usr/lib/jvm/default-java
DEB_JARS             := ant-nodeps
DEB_ANT_BUILD_TARGET := package javadoc
DEB_ANT_BUILDFILE    := debian/build.xml
DEB_ANT_ARGS         := -Dpackage=$(PACKAGE) -Dversion=$(VERSION) -DbuildVersion=$(BUILD_VERSION)
API_DOCS             := build/docs/api
BASE_MODULES         := maven-artifact-manager maven-artifact-test maven-artifact \
				maven-compat maven-core maven-error-diagnostics maven-model maven-monitor \
				maven-plugin-api maven-plugin-descriptor maven-plugin-parameter-documenter \
				maven-plugin-registry maven-profile maven-project maven-repository-metadata \
				maven-settings maven-toolchain

get-orig-source:
		-uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename

makebuilddir/lib$(PACKAGE)-java::
	# add empty directories to fix the build
		install -d maven-repository-metadata/src/main/java
		install -d maven-model/src/main/java
		install -d maven-plugin-parameter-documenter/src/main/java

binary-post-install/lib$(PACKAGE)-java::
		mh_installpoms -plib$(PACKAGE)-java;
		set -e; for MODULE in $(BASE_MODULES); do \
		  mh_installjar -plib$(PACKAGE)-java -l $$MODULE/pom.xml $$MODULE/build/$$MODULE-$(VERSION).jar; \
		done
		mh_installjar -plib$(PACKAGE)-java -l maven-reporting/maven-reporting-api/pom.xml maven-reporting/maven-reporting-api/build/maven-reporting-api-$(VERSION).jar; 
		mh_installjar -plib$(PACKAGE)-java -l maven-script/maven-script-ant/pom.xml maven-script/maven-script-ant/build/maven-script-ant-$(VERSION).jar; 
		mh_installjar -plib$(PACKAGE)-java -l maven-script/maven-script-beanshell/pom.xml maven-script/maven-script-beanshell/build/maven-script-beanshell-$(VERSION).jar; 

binary-post-install/lib$(PACKAGE)-java-doc::
		dh_install -plib$(PACKAGE)-java-doc $(API_DOCS) /usr/share/doc/libmaven2-core-java/

clean::
		mh_clean
		mh_unpatchpoms -plib$(PACKAGE)-java
		-rm -rf debian/tmp

# No documentation released yet.
#binary-post-install/$(PACKAGE)-doc::

Builds:

libmaven2-core-java
core libraries for maven2
libmaven2-core-java-doc
api documentation for maven2