DEB packaging of Comarch Crypto Provider from ePUAP
Jacek Kowalski
2019-09-25 b649e084029d34916dc3ff2c12ecc2e5ce5ccc16
commit | author | age
8be2bb 1 #!/usr/bin/make -f
JK 2
3 NAME = ComarchCryptoProvider
4 VERSION = 1.0
5 PACKAGENAME = comarchcryptoprovider
6 PACKAGEVERSION = $(VERSION)-0
7 URL = https://epuap.gov.pl/signing/plugin/linux
8 BASENAME = ComarchCryptoProvider-installer.sh
9 TARBALL = ComarchCryptoProvider-installer
10
11 %:
12     dh $@ --with systemd
13
14 override_dh_usrlocal:
15 override_dh_shlibdeps:
16     dh_shlibdeps -- -l"debian/$(PACKAGENAME)/usr/local/$(NAME)"
17 override_dh_strip:
18
19 override_dh_auto_clean:
20     rm -f "$(BASENAME)" "$(TARBALL)"
21     rm -f ccp-system "debian/$(PACKAGENAME).init"
22     rm -f ccp-system.service "debian/$(PACKAGENAME).service"
23 override_dh_auto_build:
24     wget -N --progress=dot:mega "$(URL)/$(BASENAME)"
25     7z x "$(BASENAME)" -aoa
26     tar --strip-components=1 -xf "$(TARBALL)" ./ccp-system ./ccp-system.service
27     cp -f ccp-system "debian/$(PACKAGENAME).init"
28     cp -f ccp-system.service "debian/$(PACKAGENAME).service"
29 override_dh_auto_install:
30     mkdir -p "debian/$(PACKAGENAME)/usr/local/$(NAME)" "debian/$(PACKAGENAME)/etc/X11/Xsession.d"
31     tar --strip-components=1 -xf "$(TARBALL)" --directory "debian/$(PACKAGENAME)/usr/local/$(NAME)/"
32     cp openssl.cnf "debian/$(PACKAGENAME)/usr/local/$(NAME)/"
33     cp Xsession-ccp "debian/$(PACKAGENAME)/etc/X11/Xsession.d/97ccp"
34     sha1sum debian/comarchcryptoprovider/usr/local/ComarchCryptoProvider/watchdog_service
35 override_dh_auto_test:
36
37 override_dh_gencontrol:
38     dh_gencontrol -- -v$(PACKAGEVERSION)