DEB packaging of PZ Signer from ePUAP (including Java 9+ fixes)
Jacek Kowalski
2019-09-25 207ea2ca32736f2d08d48410bc9ec6246c8c1c13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/make -f
 
NAME = pzsigner
VERSION = 1.0
PACKAGENAME = pzsigner
PACKAGEVERSION = $(VERSION)-0
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
    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.*'
 
override_dh_gencontrol:
    dh_gencontrol -- -v$(PACKAGEVERSION)