File: rules

package info (click to toggle)
clojure 1.1.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,232 kB
  • ctags: 4,631
  • sloc: java: 29,016; xml: 217; sh: 66; makefile: 26
file content (33 lines) | stat: -rwxr-xr-x 1,221 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/make -f

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 = clojure-$(ORIG_VERSION).orig

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

JAVA_HOME := /usr/lib/jvm/java-6-openjdk
DEB_JARS  := asm3 asm3-commons

DEB_INSTALL_CHANGELOGS_ALL := changes.txt

binary-post-install/clojure::
	mh_installpoms -pclojure
	mh_installjar -pclojure -l pom.xml clojure.jar

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/* $$subdir/.??* debian/$(SRCDIR_NAME) && \
		rmdir $$subdir ; \
	fi
	rm debian/$(SRCDIR_NAME)/clojure*.jar
	tar czf ../clojure_$(ORIG_VERSION).orig.tar.gz -C debian $(SRCDIR_NAME)
	rm -rf debian/$(SRCDIR_NAME)