debian swirl logo

Back to the packages list xml-commons-external

#!/usr/bin/make -f
# debian/rules for libxml-commons-external-java (uses CDBS)

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

VERSION := ${DEB_UPSTREAM_VERSION}

JAVA_HOME := /usr/lib/jvm/default-java

clean::
		rm -rf classes xml-apis-ext.jar xml-apis.jar docs

build-indep:
	# Build all classes
		mkdir classes
		javac -source 1.4 -d classes `find org/ javax/ -name '*.java'`

	# Build xml-apis-ext and xml-apis jar
		(cd classes/; jar -cvfm ../xml-apis-ext.jar ../manifest.commons \
		  `find -type d -name "sac" -o -name "smil" -o -name "svg"`)
		(cd classes/; jar -cvfm ../xml-apis.jar ../manifest.commons \
		  `find -type f ! \( -wholename "*/sac/*" -o -wholename "*/smil/*" -o -wholename "*/svg/*" \)`)

	#Build api documentation
		mkdir api
		javadoc -d api javax.xml org.apache.xmlcommons org.w3c.css.sac org.w3c.dom

install/libxml-commons-external-java::
	# Install xml-apis-ext
		mh_installpom -v -plibxml-commons-external-java debian/xml-apis-ext.xml
		mh_installjar -plibxml-commons-external-java -l debian/xml-apis-ext.xml \
			-s -nxml-apis-ext -i${VERSION} xml-apis-ext.jar
		dh_link -plibxml-commons-external-java /usr/share/java/xml-apis-ext-${VERSION}.jar /usr/share/java/xml-commons-external-${VERSION}.jar
		dh_link -plibxml-commons-external-java /usr/share/java/xml-apis-ext-${VERSION}.jar /usr/share/java/xml-commons-external.jar
		dh_link -plibxml-commons-external-java /usr/share/java/xml-apis-ext-${VERSION}.jar /usr/share/java/xml-apis-ext.jar

	# Install xml-apis
		mh_installpom -v -plibxml-commons-external-java debian/xml-apis.xml
		mh_installjar -plibxml-commons-external-java -l debian/xml-apis.xml \
			-s -nxml-apis -i${VERSION} xml-apis.jar
		dh_link -plibxml-commons-external-java /usr/share/java/xml-apis-${VERSION}.jar /usr/share/java/jaxp-1.4.jar

install/libxml-commons-external-java-doc::
	# Install the documentation into the libxml-commons-java-doc package
		mkdir -p debian/libxml-commons-external-java-doc/usr/share/doc/libxml-commons-external-java/
		cp -r api debian/libxml-commons-external-java-doc/usr/share/doc/libxml-commons-external-java/

get-orig-source::
		uscan --force-download --rename

Builds:

libxml-commons-external-java-doc
documentation of xml commons external api
libxml-commons-external-java
xml commons external code - dom, sax, and jaxp, etc