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