File: rules

package info (click to toggle)
libcommons-openpgp-java 0%2Bsvn533492-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 196 kB
  • ctags: 137
  • sloc: java: 667; xml: 203; makefile: 24
file content (32 lines) | stat: -rwxr-xr-x 1,426 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
#!/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' ' | sed 's/-[0-9]*$$//')

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

DEB_JARS             := $(ANT_HOME)/lib/ant-launcher.jar $(ANT_HOME)/lib/ant-trax.jar xalan2 bcpg bcprov junit
DEB_ANT_BUILD_TARGET := package
DEB_ANT_BUILDFILE    := ./debian/build.xml
DEB_ANT_ARGS         := -Dpackage=$(PACKAGE) -Dversion=$(VERSION)
API_DOCS             := build/doc/api
SVN                  := http://svn.apache.org/repos/asf/jakarta/commons/sandbox/openpgp/trunk/
REVISION             := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f2 -d' ' | cut -f1 -d- | sed 's/.*svn//' | sed 's/[^0-9].*//')

get-orig-source:
	echo "Getting version $(VERSION) from $(SVN)"
	mkdir orig_tmp
	cd orig_tmp && \
		svn export -q -r $(REVISION) $(SVN) $(PACKAGE) && \
		tar czf ../../$(PACKAGE)_$(VERSION).orig.tar.gz $(PACKAGE)
	rm -rf orig_tmp
	
binary-post-install/$(PACKAGE)::
	dh_install -p$(PACKAGE) build/$(PACKAGE)-$(VERSION).jar usr/share/java && \
	dh_link -p$(PACKAGE) usr/share/java/$(PACKAGE)-$(VERSION).jar usr/share/java/$(PACKAGE).jar; \

binary-post-install/$(PACKAGE)-doc::
	dh_install -p$(PACKAGE)-doc $(API_DOCS) usr/share/doc/$(PACKAGE)