File: rules

package info (click to toggle)
fop 1%3A2.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 102,104 kB
  • sloc: java: 215,436; xml: 100,787; sh: 381; python: 316; javascript: 272; makefile: 44
file content (57 lines) | stat: -rwxr-xr-x 2,346 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

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

# unexport DISPLAY for so cowbuilder builds don't fail
unexport DISPLAY

%:
	dh $@ --buildsystem=maven

override_dh_auto_configure:
	unzip -j -o debian/offo-hyphenation_v2.2.zip \
		offo-hyphenation/hyph/\* -d fop/hyph/
	dh_auto_configure 

override_dh_auto_install:
	cp -a debian/fop.sh debian/fop/usr/bin/fop
	cp -a debian/fop-ttfreader.sh debian/fop/usr/bin/fop-ttfreader
	cp -a debian/fop.1 fop/build/fop.1
	pod2man --section=1 \
		--release="Fop-TTFReader " \
		debian/fop-ttfreader.pod > fop/build/fop-ttfreader.1
	mkdir -p $(CURDIR)/debian/libfop-java/usr/share/fop/
	cp -a $(CURDIR)/fop/build/fop-hyph.jar $(CURDIR)/debian/libfop-java/usr/share/fop/
	-mkdir -p debian/fop-doc/usr/share/doc/fop-doc/html/api
	cp -a fop/build/javadocs/* debian/fop-doc/usr/share/doc/fop-doc/html/api/
	dh_auto_install

override_dh_auto_build:
	dh_auto_build -- -X package
	mkdir -p fop/lib/build
	cp $(CURDIR)/fop/target/fop-2.5.jar fop/lib/
	# While the README mention those are deprecated build instructions it
	# seems those targets have not been moved to the new maven build system
	ant -f fop/build.xml -lib /usr/share/java/xmlgraphics-commons.jar:/usr/share/java/commons-logging.jar:/usr/share/java/commons-io.jar:/usr/share/java/batik-libs.jar:/usr/share/java/xml-apis-ext.jar:/usr/share/java/fontbox2.jar:/usr/share/java/servlet-api-3.1.jar jar-hyphenation
	ant -f fop/build.xml -lib /usr/share/java/xmlgraphics-commons.jar:/usr/share/java/commons-logging.jar:/usr/share/java/commons-io.jar:/usr/share/java/batik-libs.jar:/usr/share/java/xml-apis-ext.jar:/usr/share/java/fontbox2.jar:/usr/share/java/servlet-api-3.1.jar javadocs

debian/fop.1: debian/fop.1.in
	help2man --no-info --version-option=-version --no-discard-stderr \
	       	--include=$< --output=$@ ./debian/fop/usr/bin/fop
	sed -i -e 's/^USAGE$$/.SH SYNOPSIS/' debian/fop.1
	sed -i -e 's/^\[OPTIONS\]$$/.SH OPTIONS/' debian/fop.1
	sed -i -e 's/^\[INPUT\]$$/.SH INPUT/' debian/fop.1
	sed -i -e 's/^\[OUTPUT\]$$/.SH OUTPUT/' debian/fop.1
	sed -i -e 's/^\[Examples\]$$/.SH EXAMPLES/' debian/fop.1
	sed -i -e 's/^fop .*$$/\n&/' debian/fop.1

override_dh_compress:
	dh_compress -X.xconf

override_dh_auto_clean:
	dh_clean fop/build/
	dh_clean fop/lib/
	dh_clean fop/hyph/*.xml
	dh_clean org/
	dh_clean javac.sh
	dh_auto_clean