debian swirl logo

Back to the packages list libstax-java

#!/usr/bin/make -f
# debian/rules file for libstax-java (uses cdbs)

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

PACKAGE              := $(DEB_SOURCE_PACKAGE)
VERSION              := $(DEB_UPSTREAM_VERSION)
API_VERSION          := 1.0.1
JAVA_HOME            := /usr/lib/jvm/default-java
DEB_JARS             := xml-apis junit
DEB_ANT_BUILD_TARGET := ri_bin_dist javadoc

binary-post-install/$(PACKAGE)::
	# cannot use the mh_* helper scripts here as stax is used to build maven-repo-helper
		mkdir -p debian/tmp
		cp debian/stax-api.pom debian/tmp/stax-api-$(API_VERSION).pom
	dh_install -p$(PACKAGE) --sourcedir= debian/tmp stax-api-$(API_VERSION).pom /usr/share/maven-repo/stax/stax-api/$(API_VERSION)/
		cp build/stax-api-$(API_VERSION).jar debian/tmp/stax-api-$(API_VERSION).jar
	dh_install -p$(PACKAGE) --sourcedir= debian/tmp stax-api-$(API_VERSION).jar /usr/share/maven-repo/stax/stax-api/$(API_VERSION)/
		dh_link -p$(PACKAGE) /usr/share/maven-repo/stax/stax-api/$(API_VERSION)/stax-api-$(API_VERSION).jar /usr/share/java/stax-api-$(API_VERSION).jar
		dh_link -p$(PACKAGE) /usr/share/maven-repo/stax/stax-api/$(API_VERSION)/stax-api-$(API_VERSION).jar /usr/share/java/stax-api.jar
		cp debian/stax-api.pom debian/tmp/stax-api-debian.pom
		perl -p -i -e 's/$(API_VERSION)/debian/' debian/tmp/stax-api-debian.pom
	dh_install -p$(PACKAGE) --sourcedir= debian/tmp stax-api-debian.pom /usr/share/maven-repo/stax/stax-api/debian/
		dh_link -p$(PACKAGE) /usr/share/maven-repo/stax/stax-api/$(API_VERSION)/stax-api-$(API_VERSION).jar /usr/share/maven-repo/stax/stax-api/debian/stax-api-debian.jar
		cp debian/stax.pom debian/tmp/stax-$(VERSION).pom
	dh_install -p$(PACKAGE) --sourcedir= debian/tmp stax-$(VERSION).pom /usr/share/maven-repo/stax/stax/$(VERSION)/
		cp build/stax-$(VERSION)-dev.jar debian/tmp/stax-$(VERSION).jar
	dh_install -p$(PACKAGE) --sourcedir= debian/tmp stax-$(VERSION).jar /usr/share/maven-repo/stax/stax/$(VERSION)/
		dh_link -p$(PACKAGE) /usr/share/maven-repo/stax/stax/$(VERSION)/stax-$(VERSION).jar /usr/share/java/stax-$(VERSION).jar
		dh_link -p$(PACKAGE) /usr/share/maven-repo/stax/stax/$(VERSION)/stax-$(VERSION).jar /usr/share/java/stax.jar
		cp debian/stax.pom debian/tmp/stax-debian.pom
		perl -p -i -e 's/$(VERSION)/debian/' debian/tmp/stax-debian.pom
	dh_install -p$(PACKAGE) --sourcedir= debian/tmp stax-debian.pom /usr/share/maven-repo/stax/stax/debian/
		dh_link -p$(PACKAGE) /usr/share/maven-repo/stax/stax/$(VERSION)/stax-$(VERSION).jar /usr/share/maven-repo/stax/stax/debian/stax-debian.jar

clean::
		-rm -rf debian/tmp

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

Builds:

libstax-java-doc
javadoc api for libstax-java
libstax-java
stax reference implementation (ri)