| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export JAVA_HOME=/usr/lib/jvm/default-java |
| 4 |
|
| 5 |
# unexport DISPLAY for so cowbuilder builds don't fail |
| 6 |
unexport DISPLAY |
| 7 |
|
| 8 |
%: |
| 9 |
dh $@ --buildsystem=maven --with javahelper |
| 10 |
|
| 11 |
override_dh_auto_configure: |
| 12 |
unzip -j -o debian/offo-hyphenation_v2.2.zip \ |
| 13 |
offo-hyphenation/hyph/\* -d fop/hyph/ |
| 14 |
dh_auto_configure |
| 15 |
|
| 16 |
override_dh_auto_install: |
| 17 |
mkdir -p debian/fop/usr/bin |
| 18 |
cp -a debian/fop.sh debian/fop/usr/bin/fop |
| 19 |
cp -a debian/fop-ttfreader.sh debian/fop/usr/bin/fop-ttfreader |
| 20 |
cp -a debian/fop.1 fop/build/fop.1 |
| 21 |
pod2man --section=1 \ |
| 22 |
--release="Fop-TTFReader " \ |
| 23 |
debian/fop-ttfreader.pod > fop/build/fop-ttfreader.1 |
| 24 |
mkdir -p $(CURDIR)/debian/libfop-java/usr/share/fop/ |
| 25 |
cp -a $(CURDIR)/fop/build/fop-hyph.jar $(CURDIR)/debian/libfop-java/usr/share/fop/ |
| 26 |
-mkdir -p debian/fop-doc/usr/share/doc/fop-doc/html/api |
| 27 |
cp -a fop/build/javadocs/* debian/fop-doc/usr/share/doc/fop-doc/html/api/ |
| 28 |
dh_auto_install |
| 29 |
|
| 30 |
override_dh_auto_build: |
| 31 |
dh_auto_build -- -X package |
| 32 |
mkdir -p fop/lib/build |
| 33 |
# While the README mention those are deprecated build instructions it |
| 34 |
# seems those targets have not been moved to the new maven build system |
| 35 |
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 |
| 36 |
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 |
| 37 |
|
| 38 |
debian/fop.1: debian/fop.1.in |
| 39 |
help2man --no-info --version-option=-version --no-discard-stderr \ |
| 40 |
--include=$< --output=$@ ./debian/fop/usr/bin/fop |
| 41 |
sed -i -e 's/^USAGE$$/.SH SYNOPSIS/' debian/fop.1 |
| 42 |
sed -i -e 's/^\[OPTIONS\]$$/.SH OPTIONS/' debian/fop.1 |
| 43 |
sed -i -e 's/^\[INPUT\]$$/.SH INPUT/' debian/fop.1 |
| 44 |
sed -i -e 's/^\[OUTPUT\]$$/.SH OUTPUT/' debian/fop.1 |
| 45 |
sed -i -e 's/^\[Examples\]$$/.SH EXAMPLES/' debian/fop.1 |
| 46 |
sed -i -e 's/^fop .*$$/\n&/' debian/fop.1 |
| 47 |
|
| 48 |
override_dh_compress: |
| 49 |
dh_compress -X.xconf |
| 50 |
|
| 51 |
override_dh_auto_clean: |
| 52 |
dh_clean fop/build/ |
| 53 |
dh_clean fop/lib/ |
| 54 |
dh_clean fop/hyph/*.xml |
| 55 |
dh_clean org/ |
| 56 |
dh_clean javac.sh |
| 57 |
dh_auto_clean |