DEB packaging of PZ Signer from ePUAP (including Java 9+ fixes)
Jacek Kowalski
2020-02-06 da0c3cd93b27ff42463620b0b39dbf60da156e0a
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
#!/usr/bin/make -f
 
NAME = pzsigner
VERSION = 1.0
PACKAGENAME = pzsigner
PACKAGEVERSION = $(VERSION)-3
URL = "https://pz.gov.pl/PZ%20Signer/linux/x86"
BASENAME = pzsigner.zip
 
%:
    dh $@
 
override_dh_auto_clean:
    find src -name '*.class' -delete
override_dh_auto_build:
    mkdir -p build
    wget -N --progress=dot:mega "$(URL)/$(BASENAME)"
    unzip -o "$(BASENAME)" -d build
    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"
    unzip -o "swt-4.13-gtk-linux-x86_64.zip" -d swt
    wget -N --progress=dot:mega "https://repo1.maven.org/maven2/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar"
    wget -N --progress=dot:mega "https://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-impl/2.3.3-b01/jaxb-impl-2.3.3-b01.jar"
 
    javac -cp 'build/x86_64/*' src/com/pentacomp/signer/KeyStoreManager.java
    cp -f build/x86_64/pz-signer-1.0-SNAPSHOT.jar build/x86_64/pz-signer-1.0-SNAPSHOT-modified.jar
    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
 
override_dh_gencontrol:
    dh_gencontrol -- -v$(PACKAGEVERSION)