1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
#!/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)
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)
API_DOCS := build/api
SCM_PROVIDERS := maven-scm-provider-accurev \
maven-scm-provider-bazaar \
maven-scm-provider-clearcase \
maven-scm-provider-hg \
maven-scm-provider-local \
maven-scm-provider-perforce \
maven-scm-providers-cvs/maven-scm-provider-cvsjava \
maven-scm-providers-cvs/maven-scm-provider-cvsexe \
maven-scm-providers-cvs/maven-scm-provider-cvs-commons \
maven-scm-providers-git/maven-scm-provider-git-commons \
maven-scm-providers-git/maven-scm-provider-gitexe \
maven-scm-providers-svn/maven-scm-provider-svn-commons \
maven-scm-providers-svn/maven-scm-provider-svnexe \
maven-scm-provider-starteam \
maven-scm-provider-synergy \
maven-scm-provider-tfs \
maven-scm-provider-vss
makebuilddir/lib$(PACKAGE)-java::
set -e; for PROVIDER in maven-scm-managers/maven-scm-manager-plexus $(addprefix maven-scm-providers/, $(SCM_PROVIDERS)); do \
COMPONENT_FILE=debian/$$(echo $$PROVIDER | cut -d'/' -f2 -)-components.xml; \
if [ -e $$COMPONENT_FILE ]; then \
install -d $$PROVIDER/build/classes/META-INF/plexus; \
install -m644 -T $$COMPONENT_FILE $$PROVIDER/build/classes/META-INF/plexus/components.xml; \
fi \
done
binary-post-install/lib$(PACKAGE)-java::
mh_installpoms -plib$(PACKAGE)-java
mh_installjar -plib$(PACKAGE)-java -l maven-scm-api/pom.xml maven-scm-api/build/maven-scm-api-$(VERSION).jar
mh_installjar -plib$(PACKAGE)-java -l maven-scm-test/pom.xml maven-scm-test/build/maven-scm-test-$(VERSION).jar
mh_installjar -plib$(PACKAGE)-java -l maven-scm-client/pom.xml maven-scm-client/build/maven-scm-client-$(VERSION).jar
mh_installjar -plib$(PACKAGE)-java -l maven-scm-managers/maven-scm-manager-plexus/pom.xml maven-scm-managers/maven-scm-manager-plexus/build/maven-scm-manager-plexus-$(VERSION).jar
set -e; for PROVIDER in $(SCM_PROVIDERS); do \
mh_installjar -plib$(PACKAGE)-java -l maven-scm-providers/$$PROVIDER/pom.xml maven-scm-providers/$$PROVIDER/build/$$(echo $$PROVIDER | cut -d'/' -f2 -)-$(VERSION).jar; \
done
binary-post-install/lib$(PACKAGE)-java-doc::
dh_install -plib$(PACKAGE)-java-doc $(API_DOCS) usr/share/doc/lib$(PACKAGE)-java
clean::
-rm -rf debian/tmp
get-orig-source:
uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
# Extract generated plexus components.xml files from a standard Maven build
PLEXUS_COMPONENTS=$(shell find . -name components.xml | grep "target/classes" | grep -v scm-client | sed -re "s,.*/([a-z-]+)/target/.*,debian/\1-components.xml,")
debian/%-components.xml:
echo $*
find . -type f -path *$*/target/classes/META-INF/plexus/components.xml -exec cp '{}' $@ \;
copy-plexus-components: $(PLEXUS_COMPONENTS)
|