debian swirl logo

Back to the packages list clojure1.2

#!/usr/bin/make -f

SOURCE = $(shell dpkg-parsechangelog | grep ^Source | sed "s/Source: //")
VER = $(shell echo $(SOURCE) | sed s/^clojure//)

VERSION = $(shell dpkg-parsechangelog | grep ^Version | sed "s/Version: //")
ORIG_VERSION = $(shell echo $(VERSION) | sed s/-.*//)
PRISTINE_VERSION = $(shell echo $(ORIG_VERSION) | sed s/\+dfsg//)
UPSTREAM_VERSION = $(shell echo $(PRISTINE_VERSION) | sed s/^0\.0\.//)
SRCDIR_NAME = $(SOURCE)-$(ORIG_VERSION).orig

include /usr/share/javahelper/java-vars.mk
include /usr/share/cdbs/1/class/ant.mk
include /usr/share/cdbs/1/rules/debhelper.mk

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

DEB_JARS  := asm3 asm3-commons

DEB_INSTALL_CHANGELOGS_ALL := changes.txt

binary-install/$(SOURCE)::
		$(JAVA_HOME)/bin/java -cp /usr/share/java/asm3.jar:/usr/share/java/asm3-commons.jar:clojure.jar clojure.main debian/gencompletions.clj > debian/$(SOURCE)/etc/rlwrap/clojure$(VER)

binary-post-install/$(SOURCE)::
		sed -i 's/@VER@/$(VER)/g' debian/$(SOURCE)/usr/bin/*
		prename 's/$$/$(VER)/' debian/$(SOURCE)/usr/bin/*
		prename 's/\.(.)$$/$(VER).$$1/' debian/$(SOURCE)/usr/share/man/*/*
		mh_installpom -p$(SOURCE) pom.xml
		mh_installjar -p$(SOURCE) -l -s pom.xml clojure.jar /usr/share/java/clojure-$(VER).jar

clean::
		-mh_clean

get-orig-source:
		-uscan --verbose --force-download --no-symlink --upstream-version $(PRISTINE_VERSION)
		mkdir debian/$(SRCDIR_NAME)
		unzip -d debian/$(SRCDIR_NAME) ../clojure?$(UPSTREAM_VERSION).zip
		if test "`ls debian/$(SRCDIR_NAME) | wc -l`" -eq "1" ; then \
		subdir= `echo debian/$(SRCDIR_NAME)/*` && \
			mv $$subdir/* debian/$(SRCDIR_NAME) && \
			rmdir $$subdir ; \
		fi
		rm debian/$(SRCDIR_NAME)/clojure*.jar
		tar czf ../$(SOURCE)_$(ORIG_VERSION).orig.tar.gz -C debian $(SRCDIR_NAME)
		rm -rf debian/$(SRCDIR_NAME)

Builds:

clojure1.2
lisp dialect for the jvm