]>
Commit | Line | Data |
---|---|---|
ae4074d4 ER |
1 | # TODO |
2 | # - new dir for gecko extensions | |
e0d0d3e2 | 3 | %define firebreath_version 1.3.2a |
ae4074d4 ER |
4 | Summary: Estonian ID card digital signing browser plugin |
5 | Name: browser-plugin-esteid | |
6 | Version: 1.2.0 | |
3dc14e8e | 7 | Release: 1 |
ae4074d4 ER |
8 | License: LGPL v2+ |
9 | Group: Applications/Networking | |
10 | URL: http://code.google.com/p/esteid/ | |
e0d0d3e2 ER |
11 | Source0: http://firebreath.googlecode.com/files/firebreath-%{firebreath_version}.7z |
12 | # Source0-md5: 15d7bfefe21b916563b0583f4ecae675 | |
ae4074d4 ER |
13 | Source1: http://esteid.googlecode.com/files/esteid-browser-plugin-%{version}.tar.bz2 |
14 | # Source1-md5: 4a26435087b8578c5727b144e5870ae6 | |
15 | BuildRequires: boost-devel | |
16 | BuildRequires: cmake | |
d7b6b8e1 | 17 | BuildRequires: gettext-devel |
ae4074d4 ER |
18 | BuildRequires: gtkmm-devel |
19 | BuildRequires: libstdc++-devel | |
20 | BuildRequires: openssl-devel | |
e0d0d3e2 | 21 | BuildRequires: p7zip |
ae4074d4 ER |
22 | BuildRequires: pkgconfig |
23 | BuildRequires: rpmbuild(macros) >= 1.577 | |
24 | BuildRequires: smartcardpp-devel | |
25 | BuildRequires: unzip | |
26 | BuildRequires: zip | |
e0d0d3e2 | 27 | Requires: browser-plugins >= 2.0 |
ae4074d4 ER |
28 | # obsolete package name upstream uses |
29 | Obsoletes: esteid-browser-plugin | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | # this comes from install.rdf | |
33 | %define extension_id \{aa84ce40-4253-11da-8cd6-0800200c9a66\} | |
34 | ||
35 | %description | |
36 | Esteid Browser Plugin is cross-browser plugin that exposes Estonian | |
37 | eID card functions via JavaScript. | |
38 | ||
39 | The plugin is used by web pages to obtain users digital signature. To | |
40 | protect privacy, only web pages in "whitelist" can use the card. For | |
41 | unlisted pages, a yellow notification bar appears. The plugin also | |
42 | implements a compatibility mode to support existing web pages that use | |
43 | old signature API-s. | |
44 | ||
45 | %prep | |
e0d0d3e2 | 46 | %setup -qcT |
ae4074d4 | 47 | # Extract firebreath |
3dc14e8e | 48 | 7z x %{SOURCE0} >/dev/null |
e0d0d3e2 | 49 | mv firebreath-%{firebreath_version}/* . |
ae4074d4 ER |
50 | # Extract esteid-browser-plugin into firebreath's projects/ subdir |
51 | install -d projects | |
52 | tar -xf %{SOURCE1} -C projects | |
53 | ||
54 | %build | |
55 | install -d build | |
56 | cd build | |
57 | export CXXFLAGS="%{rpmcxxflags} -fno-strict-aliasing" | |
58 | export CFLAGS="$CXXFLAGS" | |
59 | %cmake .. \ | |
60 | -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \ | |
61 | -DCMAKE_SKIP_RPATH=TRUE \ | |
62 | -DDOCDIR=%{_docdir} \ | |
63 | -DWITH_SYSTEM_BOOST:BOOL=YES | |
64 | ||
65 | %{__make} | |
66 | ||
67 | ||
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
52141b13 | 70 | %{__make} -C build install \ |
ae4074d4 | 71 | DESTDIR=$RPM_BUILD_ROOT |
ae4074d4 ER |
72 | |
73 | install -d $RPM_BUILD_ROOT%{_libdir}/browser-plugins | |
74 | mv $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/npesteid.so $RPM_BUILD_ROOT%{_libdir}/browser-plugins | |
75 | ||
76 | # Install Gecko extension | |
52141b13 ER |
77 | install -d $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{extension_id} |
78 | cp -a build/projects/esteid-browser-plugin-1/Mozilla/xpi/* \ | |
79 | $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{extension_id} | |
80 | ||
81 | %find_lang esteid-browser-plugin | |
ae4074d4 ER |
82 | |
83 | %clean | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | ||
e0d0d3e2 ER |
86 | %post |
87 | %update_browser_plugins | |
88 | ||
89 | %postun | |
90 | if [ "$1" = 0 ]; then | |
91 | %update_browser_plugins | |
92 | fi | |
93 | ||
ae4074d4 ER |
94 | %files -f esteid-browser-plugin.lang |
95 | %defattr(644,root,root,755) | |
96 | %doc projects/esteid-browser-plugin-%{version}/AUTHORS | |
97 | %attr(755,root,root) %{_libdir}/browser-plugins/npesteid.so | |
98 | %{_datadir}/esteid-browser-plugin | |
52141b13 | 99 | %{_libdir}/mozilla/extensions/%{extension_id} |