#!/usr/bin/make -f
# -*- makefile -*-
#export DH_VERBOSE=1
include /usr/share/dpkg/pkg-info.mk
# Referencing the Maven coordinates of the dependencies.
NAGA_COORDINATES = \ncom.google.code\nnaga\ndebian\n
CLI_COORDINATES = \ncommons-cli\ncommons-cli\ndebian\n
INCHI_COORDINATES = \nnet.sf.jni-inchi\njni-inchi\ndebian\n
%:
dh $@ --with javahelper --buildsystem=maven
override_dh_install:
dh_install
# Using imagemagick to resize the icon
mkdir -p debian/jmol/usr/share/icons/hicolor/96x96/apps/
convert src/org/openscience/jmol/app/images/icon.png -resize 96x96\! debian/jmol/usr/share/icons/hicolor/96x96/apps/jmol-icon.png
execute_before_dh_auto_configure:
# Putting the Maven coordinates of the dependencies in the upstream template
# pom file.
# Also putting the dfsg-stripped upstream version number in the pom.
# Indicating the path to the source, which is not the standard src/main/java.
# Indicating the path to the resources, excluding .class files, so that
# icons, images and translation files are included.
sed -e 's,\(\),\1\n$(NAGA_COORDINATES)\n$(CLI_COORDINATES)\n$(INCHI_COORDINATES),' \
-e 's/\(@version@\)/\1$(DEB_VERSION_UPSTREAM)/; s/@version@\(.*\)+dfsg[0-9]*/\1/' \
-e 's|\(\)|srcsrc**/*.java\1|' \
tools/pom.xml.template > pom.xml
override_dh_clean:
dh_clean
# Removing the pom.xml file we settled there
-rm pom.xml