]>
Commit | Line | Data |
---|---|---|
e9496f7d ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
ae4074d4 | 5 | # TODO |
e9496f7d ER |
6 | # - new dir for gecko extensions in browser-plugins or filesystem package |
7 | ||
f03b3298 | 8 | %define firebreath_version 1.5.2 |
ae4074d4 | 9 | Summary: Estonian ID card digital signing browser plugin |
a2c40f98 | 10 | Summary(pl.UTF-8): Wtyczka przeglądarki do cyfrowego podpisywania przy użyciu estońskich kart eID |
ae4074d4 | 11 | Name: browser-plugin-esteid |
f03b3298 | 12 | Version: 1.3.3 |
e9496f7d | 13 | Release: 1 |
f03b3298 ER |
14 | # The source files from esteid-browser-plugin and Firebreath are compiled |
15 | # together to the shared object npesteid.so. | |
16 | # Firebreath is dual-licensed [BSD or LGPLv2+], esteid-browser-plugin is LGPLv2+. | |
17 | # The resulting npesteid.so binary is: LGPLv2+. | |
18 | # | |
19 | # The files in mozilla-esteid subpackage are all from esteid-browser-plugin | |
20 | # tarball and are LGPLv2+. | |
ae4074d4 ER |
21 | License: LGPL v2+ |
22 | Group: Applications/Networking | |
a2c40f98 | 23 | #Source0Download: http://code.google.com/p/firebreath/downloads/list |
e0d0d3e2 | 24 | Source0: http://firebreath.googlecode.com/files/firebreath-%{firebreath_version}.7z |
f03b3298 ER |
25 | # Source0-md5: 7321e1c2157b69faf68e4b64aeb0ab3d |
26 | # Source1Download: http://code.google.com/p/esteid/downloads/list | |
ae4074d4 | 27 | Source1: http://esteid.googlecode.com/files/esteid-browser-plugin-%{version}.tar.bz2 |
f03b3298 | 28 | # Source1-md5: d9af514fb8fa251e9039340f7063eb12 |
b6d66787 | 29 | Patch0: boost-1.50.patch |
a2c40f98 | 30 | URL: http://code.google.com/p/esteid/ |
ae4074d4 ER |
31 | BuildRequires: boost-devel |
32 | BuildRequires: cmake | |
d7b6b8e1 | 33 | BuildRequires: gettext-devel |
ae4074d4 ER |
34 | BuildRequires: gtkmm-devel |
35 | BuildRequires: libstdc++-devel | |
36 | BuildRequires: openssl-devel | |
e0d0d3e2 | 37 | BuildRequires: p7zip |
ae4074d4 ER |
38 | BuildRequires: pkgconfig |
39 | BuildRequires: rpmbuild(macros) >= 1.577 | |
40 | BuildRequires: smartcardpp-devel | |
41 | BuildRequires: unzip | |
42 | BuildRequires: zip | |
e0d0d3e2 | 43 | Requires: browser-plugins >= 2.0 |
ae4074d4 ER |
44 | # obsolete package name upstream uses |
45 | Obsoletes: esteid-browser-plugin | |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
47 | ||
48 | # this comes from install.rdf | |
49 | %define extension_id \{aa84ce40-4253-11da-8cd6-0800200c9a66\} | |
50 | ||
51 | %description | |
52 | Esteid Browser Plugin is cross-browser plugin that exposes Estonian | |
53 | eID card functions via JavaScript. | |
54 | ||
55 | The plugin is used by web pages to obtain users digital signature. To | |
56 | protect privacy, only web pages in "whitelist" can use the card. For | |
57 | unlisted pages, a yellow notification bar appears. The plugin also | |
58 | implements a compatibility mode to support existing web pages that use | |
a2c40f98 JB |
59 | old signature APIs. |
60 | ||
61 | %description -l pl.UTF-8 | |
62 | Esteid Browser Plugin to wtyczka dla wielu przeglądarek udostępniająca | |
63 | funkcje estońskich kart eID z poziomu JavaScriptu. | |
64 | ||
65 | Wtyczka może być używana na stronach WWW w celu przesłania podpisu | |
66 | elektronicznego użytkownika. Aby chronić prywatność, podpisu mogą | |
67 | używać tylko strony z "białej listy". W przypadku stron nie | |
68 | znajdujących się na liście pojawia się żółty pasek powiadomienia. | |
69 | Wtyczka ma zaimplementowany także tryb kompatybilności obsługujący | |
70 | istniejące strony WWW używające stare API do podpisów. | |
ae4074d4 ER |
71 | |
72 | %prep | |
e0d0d3e2 | 73 | %setup -qcT |
ae4074d4 | 74 | # Extract firebreath |
f03b3298 | 75 | 7z x %{SOURCE0} > /dev/null |
e0d0d3e2 | 76 | mv firebreath-%{firebreath_version}/* . |
f03b3298 | 77 | |
ae4074d4 ER |
78 | # Extract esteid-browser-plugin into firebreath's projects/ subdir |
79 | install -d projects | |
f03b3298 ER |
80 | tar xf %{SOURCE1} -C projects |
81 | ||
82 | # Remove bundled libraries | |
83 | %{__rm} -rv src/3rdParty/boost | |
84 | %{__rm} -rv src/libs | |
ae4074d4 | 85 | |
b6d66787 JR |
86 | %patch0 -p1 |
87 | ||
ae4074d4 ER |
88 | %build |
89 | install -d build | |
90 | cd build | |
f03b3298 | 91 | export CXXFLAGS="%{rpmcxxflags} -fno-strict-aliasing" |
ae4074d4 ER |
92 | export CFLAGS="$CXXFLAGS" |
93 | %cmake .. \ | |
e9496f7d | 94 | -DVERBOSE:BOOL=YES \ |
ae4074d4 ER |
95 | -DWITH_SYSTEM_BOOST:BOOL=YES |
96 | ||
97 | %{__make} | |
98 | ||
99 | ||
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
52141b13 | 102 | %{__make} -C build install \ |
ae4074d4 | 103 | DESTDIR=$RPM_BUILD_ROOT |
ae4074d4 ER |
104 | |
105 | install -d $RPM_BUILD_ROOT%{_libdir}/browser-plugins | |
106 | mv $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/npesteid.so $RPM_BUILD_ROOT%{_libdir}/browser-plugins | |
107 | ||
108 | # Install Gecko extension | |
52141b13 | 109 | install -d $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{extension_id} |
e9496f7d | 110 | cp -a build/projects/esteid/Mozilla/xpi/* \ |
52141b13 ER |
111 | $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{extension_id} |
112 | ||
113 | %find_lang esteid-browser-plugin | |
ae4074d4 ER |
114 | |
115 | %clean | |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | ||
e0d0d3e2 ER |
118 | %post |
119 | %update_browser_plugins | |
120 | ||
121 | %postun | |
122 | if [ "$1" = 0 ]; then | |
123 | %update_browser_plugins | |
124 | fi | |
125 | ||
ae4074d4 ER |
126 | %files -f esteid-browser-plugin.lang |
127 | %defattr(644,root,root,755) | |
128 | %doc projects/esteid-browser-plugin-%{version}/AUTHORS | |
e9496f7d | 129 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esteid-browser-plugin.conf |
ae4074d4 ER |
130 | %attr(755,root,root) %{_libdir}/browser-plugins/npesteid.so |
131 | %{_datadir}/esteid-browser-plugin | |
52141b13 | 132 | %{_libdir}/mozilla/extensions/%{extension_id} |