File: rules

package info (click to toggle)
jmol 16.2.33%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 41,128 kB
  • sloc: java: 304,265; xml: 905; sh: 201; javascript: 50; cpp: 20; makefile: 18
file content (37 lines) | stat: -rwxr-xr-x 1,821 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
#!/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 = <dependency>\n<groupId>com.google.code</groupId>\n<artifactId>naga</artifactId>\n<version>debian</version>\n</dependency>
CLI_COORDINATES = <dependency>\n<groupId>commons-cli</groupId>\n<artifactId>commons-cli</artifactId>\n<version>debian</version>\n</dependency>
INCHI_COORDINATES = <dependency>\n<groupId>net.sf.jni-inchi</groupId>\n<artifactId>jni-inchi</artifactId>\n<version>debian</version>\n</dependency>

%:
	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,\(<dependencies>\),\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|\(</project>\)|<build><sourceDirectory>src</sourceDirectory><resources><resource><directory>src</directory><excludes><exclude>**/*.java</exclude></excludes></resource></resources></build>\1|' \
	    tools/pom.xml.template > pom.xml

override_dh_clean:
	dh_clean
	# Removing the pom.xml file we settled there
	-rm pom.xml