debian swirl logo

Back to the packages list segment

#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include /usr/share/cdbs/1/class/ant.mk

JAVA_HOME := /usr/lib/jvm/default-java
DEB_JARS := commons-cli commons-logging junit4
DEB_ANT_BUILD_TARGET := jardist
DEB_INSTALL_CHANGELOGS_ALL := doc/history.html
DEB_INSTALL_DOCS_ALL := doc/readme.html

VER := $(shell echo $(DEB_UPSTREAM_VERSION) | awk -F'~' '{print $$1}')
SVN_REV := $(shell echo $(DEB_UPSTREAM_VERSION) | awk -F'~' '{print $$2}' | sed 's/^svn//' | sed 's/\+dfsg.*//')

install/libsegment-java::
		install -m 644 -D build/dist/segment-$(VER).jar \
			$(CURDIR)/debian/$(cdbs_curpkg)/usr/share/java/segment-$(VER).jar
		dh_link -p$(cdbs_curpkg) usr/share/java/segment-$(VER).jar \
			usr/share/java/segment.jar

get-orig-source:
		svn export https://segment.svn.sourceforge.net/svnroot/segment/trunk/segment \
			-r $(SVN_REV) $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) && \
		rm -rf $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION)/lib && \
	GZIP= --best tar czf $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz \
			$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) && \
		rm -rf $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) 

Builds:

libsegment-java
rule based text splitting library