File: rules

package info (click to toggle)
biojava-live 1:1.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 55,068 kB
  • sloc: java: 180,821; xml: 6,906; sql: 510; makefile: 66
file content (100 lines) | stat: -rwxr-xr-x 2,874 bytes parent folder | download | duplicates (2)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# include series of variables to become more version-independent
# in this debian/rules file.
include /usr/share/cdbs/1/rules/buildvars.mk

export JAVA_HOME := $(shell /usr/sbin/update-java-alternatives -l | head -1 | cut -d' ' -f 3)

# version are the first two decimals
SOVERSION=$(shell echo $(DEB_UPSTREAM_VERSION) | cut -f1,2 -d. )

build: build-stamp

build-stamp:
	dh_testdir
	find . -name "*.java" -o -name ReadMe -o -name "*.fa" -o -name "*.html" | xargs -r chmod 644 
	# circumvent Debian's difficulties with libjgrapht - deleting all usage of that library
	rm -rf src/org/biojavax/bio/phylo/io/nexus/ \
	       src/org/biojavax/bio/phylo/DistanceBasedTreeMethod.java \
	       src/org/biojavax/bio/phylo/ParsimonyTreeMethod.java

	# Add here commands to compile the package.
	ANT_OPTS="-Xms1024m -Xmx1024m" ant package-biojava
	#ant compile-demos
	ant javadocs-biojava

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	# Add here commands to clean up after the build process.
	ant clean

	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	cp ant-build/biojava.jar $(CURDIR)/debian/libbiojava$(SOVERSION)-java/usr/share/java/biojava$(DEB_UPSTREAM_VERSION).jar
	d=$(CURDIR)/debian/libbiojava-java-doc/usr/share/doc/libbiojava-java/api; \
	[ -d $$d ] || mkdir -p $$d ; \
	cp -r ant-build/docs/biojava/* $$d
	for i in $(CURDIR)/debian/libbiojava-java*; do \
		if [ -d "$i" ]; then \
			find $i -name ".svn" | xargs -r rm -r ;	 \
		fi ; \
	done

	ant runtests


binary-arch:
# We have nothing to do by default.

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs
	dh_installexamples -plibbiojava-java-demos demos/*
	#dh_installman
	dh_link -p libbiojava-java /usr/share/java/biojava$(DEB_UPSTREAM_VERSION).jar /usr/share/java/biojava.jar
	# thinking about svn snapshots
	if [ "$(SOVERSION)" != "$(DEB_UPSTREAM_VERSION)" ]; then \
		dh_link -p libbiojava$(SOVERSION)-java \
			   /usr/share/java/biojava$(DEB_UPSTREAM_VERSION).jar \
			   /usr/share/java/biojava$(SOVERSION).jar; \
	fi
	dh_link # use <pkg>.link files for version independant linking
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

get-orig-source:
	version=$(DEB_UPSTREAM_VERSION).svn.`date +"%Y%m%d"|tr -d '\n'` ; \
	targetdir=biojava-live-$$version ; \
	origtargz=biojava-live_$$version.orig.tar.gz ; \
	cd .. ; \
	svn co svn://code.open-bio.org/biojava/biojava-live/trunk $$targetdir ; \
	find $$targetdir -name ".svn" | xargs -r rm -r ; \
	find $$targetdir -name "*.jar" | xargs -r rm  ; \
	tar czf $$origtargz $$targetdir ; \
	rm -rf $$targetdir

.PHONY: build clean binary-indep binary-arch binary install configure get-orig-source