File: rules

package info (click to toggle)
stylebook 1.0~b3~svn20061109-7
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 1,380 kB
  • sloc: java: 2,149; xml: 647; makefile: 31
file content (44 lines) | stat: -rwxr-xr-x 1,464 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
#!/usr/bin/make -f

JAVA_HOME	:= /usr/lib/jvm/default-java
DEB_JARS_BASE	:= /usr/share/java
JAVACMD  	:= $(JAVA_HOME)/bin/java

DEB_JARS 	:= ant ant-launcher xercesImpl

DEB_CLASSPATH = $(shell for jar in $(DEB_JARS); do \
		if [ -f "$$jar" ]; then echo -n "$${jar}:"; fi; \
		if [ -f "$$jar".jar ]; then echo -n "$${jar}.jar:"; fi; \
		if [ -f $(DEB_JARS_BASE)/"$$jar" ]; then echo -n "$(DEB_JARS_BASE)/$${jar}:"; fi; \
		if [ -f $(DEB_JARS_BASE)/"$$jar".jar ]; then echo -n "$(DEB_JARS_BASE)/$${jar}.jar:"; fi; \
		done; \
		if [ -f "$(JAVA_HOME)/lib/tools.jar" ]; then echo -n "$(JAVA_HOME)/lib/tools.jar"; fi)

DEB_ANT_ARGS	:= -Dbin.dir=build -Dant.build.javac.source=1.5 \
	    -Dant.build.javac.target=1.5
ANT_INVOKE	:= $(JAVACMD) -classpath $(DEB_CLASSPATH) \
		org.apache.tools.ant.Main $(DEB_ANT_ARGS)

PKGNAME		:= stylebook
INSTALLDIR	:= $(CURDIR)/debian/lib$(PKGNAME)-java
JAVALIBDIR	:= $(INSTALLDIR)/usr/share/java

TARGETS 	:= build build-arch build-indep clean binary-indep binary-arch binary install

$(TARGETS):
	dh $@

override_dh_auto_build:
	$(ANT_INVOKE)

override_dh_auto_clean:
	$(ANT_INVOKE) clean

override_dh_auto_install:
	$(eval JARNAME := $(shell basename build/$(PKGNAME)-*_xalan-2.jar))
	jh_classpath --classpath="/usr/share/java/xercesImpl.jar" build/$(JARNAME)
	dh_install -plibstylebook-java build/$(JARNAME) /usr/share/java
	dh_link -plibstylebook-java usr/share/java/$(JARNAME) usr/share/java/$(PKGNAME).jar

.PHONY: $(TARGETS)