File: rules

package info (click to toggle)
libsaxon-java 1%3A6.5.5-8
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 16,548 kB
  • sloc: java: 36,724; xml: 7,470; makefile: 38; sh: 1
file content (57 lines) | stat: -rwxr-xr-x 1,749 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

UPSTREAM_VERSION=6.5.5
JAVA_HOME=/usr/lib/jvm/default-java
SOURCES=src
BUILD=build
APIDOC=build/api
JDOM=com/icl/saxon/jdom
CLASSPATH = /usr/share/java/jdom1.jar
JAVADOC = $(JAVA_HOME)/bin/javadoc -encoding ISO-8859-1

include /usr/share/gcj/debian_defaults
ifneq (,$(filter $(DEB_HOST_ARCH), $(gcj_native_archs)))
  with_gcj_native := yes
endif

%:
	dh $@ --with javahelper

override_dh_auto_build:
	if [ ! -d $(BUILD) ]; then mkdir $(BUILD); mkdir $(APIDOC); fi	
	$(JAVA_HOME)/bin/javac -nowarn -source 1.5 -target 1.5 -sourcepath $(SOURCES) -classpath $(CLASSPATH) -d $(BUILD) `find $(SOURCES) -name \*.java`
	cp -r $(SOURCES)/META-INF $(BUILD)
	cp debian/MANIFEST.MF $(BUILD)/META-INF
	# split off jdom classes, everything else into saxon.jar
	(cd $(BUILD); $(JAVA_HOME)/bin/jar -cfM ../saxon.jar META-INF `find . -name \*.class | egrep -v $(JDOM)`; \
	 $(JAVA_HOME)/bin/jar -cfM ../saxon-jdom.jar $(JDOM)/*.class )
	touch build-stamp

binary binary-indep:
	# Only compile the javadoc if we have too
	(cd $(APIDOC) ; $(JAVADOC) -sourcepath ../../$(SOURCES) -link /usr/share/doc/default-jdk-doc/api \
		-link /usr/share/doc/libjdom1-java/api @../../debian/javadoc-args )
	dh $@ --with javahelper

override_dh_auto_clean:
	rm -f build-stamp configure-stamp saxon*.jar
	rm -rf $(BUILD)

override_jh_installlibs:
	jh_installlibs --upstream-version="$(UPSTREAM_VERSION)"

override_jh_depends:
	# jh_depends chokes on the jar file for some reason
	jh_depends -plibsaxon-java-doc

override_dh_strip:
ifeq ($(with_gcj_native),yes)
	dh_nativejava -plibsaxon-java-gcj
endif
	dh_strip