DEB packaging of PZ Signer from ePUAP (including Java 9+ fixes)
Jacek Kowalski
2019-10-22 1b739a129d0941205f6e94f26cc57f6a8b6120ad
commit | author | age
207ea2 1 #!/usr/bin/make -f
JK 2
3 NAME = pzsigner
4 VERSION = 1.0
5 PACKAGENAME = pzsigner
1b739a 6 PACKAGEVERSION = $(VERSION)-2
207ea2 7 URL = "https://pz.gov.pl/PZ%20Signer/linux/x86"
JK 8 BASENAME = pzsigner.zip
9
10 %:
11     dh $@
12
13 override_dh_auto_clean:
14     find src -name '*.class' -delete
15 override_dh_auto_build:
16     mkdir -p build
17     wget -N --progress=dot:mega "$(URL)/$(BASENAME)"
1b739a 18     unzip -o "$(BASENAME)" -d build
JK 19     wget -N --progress=dot:mega "http://ftp.fau.de/eclipse/eclipse/downloads/drops4/R-4.13-201909161045/swt-4.13-gtk-linux-x86_64.zip"
20     unzip -o "swt-4.13-gtk-linux-x86_64.zip" -d swt
f7748d 21     wget -N --progress=dot:mega "http://central.maven.org/maven2/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar"
JK 22     wget -N --progress=dot:mega "http://central.maven.org/maven2/com/sun/xml/bind/jaxb-impl/2.3.3-b01/jaxb-impl-2.3.3-b01.jar"
1b739a 23
207ea2 24     javac -cp 'build/x86_64/*' src/com/pentacomp/signer/KeyStoreManager.java
JK 25     cp -f build/x86_64/pz-signer-1.0-SNAPSHOT.jar build/x86_64/pz-signer-1.0-SNAPSHOT-modified.jar
1b739a 26     zip -d build/x86_64/pz-signer-1.0-SNAPSHOT-modified.jar META-INF/MANIFEST.MF 'META-INF/SIGNING.*' 'org/eclipse/swt/*' 'libswt*' version.txt
207ea2 27
JK 28 override_dh_gencontrol:
29     dh_gencontrol -- -v$(PACKAGEVERSION)