3 %bcond_without tests # build without tests
6 # - new dir for gecko extensions in browser-plugins or filesystem package
8 %define firebreath_version 1.5.2
9 Summary: Estonian ID card digital signing browser plugin
10 Summary(pl.UTF-8): Wtyczka przeglądarki do cyfrowego podpisywania przy użyciu estońskich kart eID
11 Name: browser-plugin-esteid
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+.
19 # The files in mozilla-esteid subpackage are all from esteid-browser-plugin
20 # tarball and are LGPLv2+.
22 Group: Applications/Networking
23 #Source0Download: http://code.google.com/p/firebreath/downloads/list
24 Source0: http://firebreath.googlecode.com/files/firebreath-%{firebreath_version}.7z
25 # Source0-md5: 7321e1c2157b69faf68e4b64aeb0ab3d
26 # Source1Download: http://code.google.com/p/esteid/downloads/list
27 Source1: http://esteid.googlecode.com/files/esteid-browser-plugin-%{version}.tar.bz2
28 # Source1-md5: d9af514fb8fa251e9039340f7063eb12
29 Patch0: boost-1.50.patch
30 URL: http://code.google.com/p/esteid/
31 BuildRequires: boost-devel
33 BuildRequires: gettext-tools
34 BuildRequires: gtkmm-devel
35 BuildRequires: libstdc++-devel
36 BuildRequires: openssl-devel
38 BuildRequires: pkgconfig
39 BuildRequires: rpmbuild(macros) >= 1.577
40 BuildRequires: smartcardpp-devel
43 Requires: browser-plugins >= 2.0
44 # obsolete package name upstream uses
45 Obsoletes: esteid-browser-plugin
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 # this comes from install.rdf
49 %define extension_id \{aa84ce40-4253-11da-8cd6-0800200c9a66\}
52 Esteid Browser Plugin is cross-browser plugin that exposes Estonian
53 eID card functions via JavaScript.
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
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.
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.
75 7z x %{SOURCE0} > /dev/null
76 mv firebreath-%{firebreath_version}/* .
78 # Extract esteid-browser-plugin into firebreath's projects/ subdir
80 tar xf %{SOURCE1} -C projects
82 # Remove bundled libraries
83 %{__rm} -rv src/3rdParty/boost
91 export CXXFLAGS="%{rpmcxxflags} -fno-strict-aliasing"
92 export CFLAGS="$CXXFLAGS"
95 -DWITH_SYSTEM_BOOST:BOOL=YES
101 rm -rf $RPM_BUILD_ROOT
102 %{__make} -C build install \
103 DESTDIR=$RPM_BUILD_ROOT
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
108 # Install Gecko extension
109 install -d $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{extension_id}
110 cp -a build/projects/esteid/Mozilla/xpi/* \
111 $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{extension_id}
113 %find_lang esteid-browser-plugin
116 rm -rf $RPM_BUILD_ROOT
119 %update_browser_plugins
122 if [ "$1" = 0 ]; then
123 %update_browser_plugins
126 %files -f esteid-browser-plugin.lang
127 %defattr(644,root,root,755)
128 %doc projects/esteid-browser-plugin-%{version}/AUTHORS
129 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esteid-browser-plugin.conf
130 %attr(755,root,root) %{_libdir}/browser-plugins/npesteid.so
131 %{_datadir}/esteid-browser-plugin
132 %{_libdir}/mozilla/extensions/%{extension_id}