debian swirl logo

Back to the packages list jta

#!/usr/bin/make -f

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

PACKAGE              := $(shell dpkg-parsechangelog | egrep '^Source:' | cut -f2 -d' ')
VERSION              := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f2 -d' ' | cut -f1 -d-)
THEIR_VERSION        := $(shell echo $(VERSION) | sed 's/+dfsg//' | sed 's/\.//')

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

DEB_JARS             := $(ANT_HOME)/lib/ant-launcher.jar $(ANT_HOME)/lib/ant-trax.jar xalan2 jdom1
DEB_ANT_BUILD_TARGET := bin-jar doc
DEB_ANT_BUILDFILE    := build.xml
DEB_ANT_ARGS         := -Dpackage=$(PACKAGE) -Dversion=$(VERSION)
#DEB_ANT_INVOKE       := ant -verbose -Dpackage=$(PACKAGE) -Dversion=$(VERSION) -f $(BUILD_FILE)
API_DOCS             := doc/source

get-orig-source:
		echo "Downloading version $(VERSION) $(THEIR_VERSION)"
		mkdir tmp
		wget -O orig-jar http://javassh.org/download/jta$(THEIR_VERSION)-src.jar && \
		cd tmp && \
		jar xf ../orig-jar && \
		rm jta$(THEIR_VERSION)/doc/rfc854.txt jta$(THEIR_VERSION)/tools/*relayd jta$(THEIR_VERSION)/tools/*relayd.exe && \
		rm -rf jta$(THEIR_VERSION)/doc/source && \
		mv jta$(THEIR_VERSION) jta_$(VERSION).orig && \
		tar czf ../../jta_$(VERSION).orig.tar.gz jta_$(VERSION).orig
		rm -rf tmp orig-jar
 
binary-post-install/$(PACKAGE)::
		mv "jar/$(PACKAGE)$(VERSION).jar" "jar/$(PACKAGE)-$(VERSION).jar"
		dh_install -p$(PACKAGE) jar/$(PACKAGE)-$(VERSION).jar usr/share/java
		dh_link -p$(PACKAGE) usr/share/java/$(PACKAGE)-$(VERSION).jar usr/share/java/$(PACKAGE).jar
		dh_installdocs -p$(PACKAGE) README

binary-post-install/$(PACKAGE)-doc::
		mv $(API_DOCS) doc/api
		dh_install -p$(PACKAGE)-doc doc/api usr/share/doc/$(PACKAGE)
		dh_install -p$(PACKAGE)-doc doc/*.html doc/plugins usr/share/doc/$(PACKAGE)

makebuilddir/$(PACKAGE)::
		-mkdir jar

cleanbuilddir/$(PACKAGE)::
		rm -rf jar doc/source doc/api

Builds:

jta-doc
java telnet/ssh applet - documentation
jta
java telnet/ssh applet