#!/usr/bin/make -f
# debian/rules for Commons Fileupload (uses CDBS)

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

JAVA_HOME_DIRS       := /usr/lib/jvm/default-java
ANT_HOME             := /usr/share/ant
DEB_ANT_BUILD_TARGET := full-dist
DEB_BUILDDIR         := src

LIBRARY=SimplyHTML
VERSION=0.13.1

build:
	/usr/bin/docbook-to-man debian/simplyhtml.sgml > simplyhtml.1
	cp debian/simplyhtml.sh simplyhtml

clean:: 
	-rm -f simplyhtml.1
	-rm -f simplyhtml
	-rm -fr bin

get-orig-source:
	if [ -f $(CURDIR)/debian/changelog ]; then \
	if [ -d $(CURDIR)/../tarballs ]; then \
	uscan --destdir $(CURDIR)/../tarballs --repack --rename ;\
	else \
	uscan --repack --rename ;\
	fi; \
	echo "Use a command like the following to create a binary free (DFSG) source file:";\
	echo "gunzip -c simplyhtml_0.13.1.orig.tar.gz | tar --delete --wildcards -vf - ./lib/\* ./api | gzip -c > simplyhtml_0.13.1+dfsg.orig.tar.gz";\
	else \
	echo "The get-orig-source uses 'uscan' and works only if 'debian/changelog' is in the current directory.";\
	fi
