forked from abn/web-eid-rpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
web-eid.spec
117 lines (93 loc) · 3.69 KB
/
web-eid.spec
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
%global _hardened_build 1
%define debug_package %{nil}
Name: web-eid
Version: 2.3.1
Release: 8
Summary: Web eID browser extension helper application
License: MIT
URL: https://github.com/web-eid/web-eid-app
Source0: %{name}-%{version}.tar.gz
Patch0: https://github.com/web-eid/libpcsc-mock/commit/488cb42301a42d8ced964a0aaafe4be0d258126d.patch
BuildRequires: bash
BuildRequires: desktop-file-utils
BuildRequires: git
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtsvg-devel
BuildRequires: qt5-qttools-devel
BuildRequires: pcsc-lite
BuildRequires: pcsc-lite-devel
BuildRequires: clang
BuildRequires: git-clang-format
BuildRequires: valgrind
BuildRequires: gtest
BuildRequires: gtest-devel
BuildRequires: openssl-devel
Requires: hicolor-icon-theme
Requires: libstdc++
Requires: mozilla-filesystem
Requires: openssl-libs
Requires: pcsc-lite-libs
Requires: qt5-qtbase
Requires: qt5-qtsvg
%description
The Web eID application performs cryptographic digital signing and authentication
operations with electronic ID smart cards for the Web eID browser extension (it
is the native messaging host for the extension). Also works standalone without
the extension in command-line mode.
%prep
%autosetup -N
%patch0 -p 1 -d web-eid-app/lib/libelectronic-id/lib/libpcsc-cpp/tests/lib/libpcsc-mock
%build
pushd web-eid-app
%cmake
%cmake_build
%install
pushd web-eid-app
%cmake_install
install -m 644 -Dt %{buildroot}/%{_sysconfdir}/chromium/native-messaging-hosts %{buildroot}/%{_datadir}/web-eid/eu.webeid.json
install -m 644 -Dt %{buildroot}/%{_sysconfdir}/opt/chrome/native-messaging-hosts %{buildroot}/%{_datadir}/web-eid/eu.webeid.json
rm -f %{buildroot}/%{_datadir}/web-eid/eu.webeid.json
%check
pushd web-eid-app
export QT_QPA_PLATFORM='offscreen' # needed for running headless tests
%ctest
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_sysconfdir}/chromium/native-messaging-hosts/
%{_sysconfdir}/opt/chrome/native-messaging-hosts/
%{_libdir}/mozilla/native-messaging-hosts/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/google-chrome/extensions/
%{_datadir}/mozilla/extensions/
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%changelog
* Sat Jun 24 2023 Arun Babu Neelicattu <[email protected]> 2.3.1-8
- fix epel builds ([email protected])
* Fri Jun 23 2023 Arun Babu Neelicattu <[email protected]> 2.3.1-7
- add desktop-file-utils to build requires ([email protected])
* Fri Jun 23 2023 Arun Babu Neelicattu <[email protected]> 2.3.1-6
- fix desktop file validation path ([email protected])
* Fri Jun 23 2023 Arun Babu Neelicattu <[email protected]> 2.3.1-5
- move desktop file validation to check ([email protected])
* Fri Jun 23 2023 Arun Babu Neelicattu <[email protected]> 2.3.1-4
- fix post install script to use correct desktop file
- use upstream libpcsc-mock patch ([email protected])
- fix spec file formatting ([email protected])
* Fri Jun 23 2023 Arun Babu Neelicattu <[email protected]> 2.3.1-3
- workaround patch file issue for tito ([email protected])
* Fri Jun 23 2023 Arun Babu Neelicattu <[email protected]> 2.3.1-2
- fix readme typo ([email protected])
* Fri Jun 23 2023 Arun Babu Neelicattu <[email protected]> 2.3.1-1
- new package built with tito