]> git.pld-linux.org Git - packages/browser-plugin-esteid.git/blob - browser-plugin-esteid.spec
- updated gettext BR
[packages/browser-plugin-esteid.git] / browser-plugin-esteid.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 # TODO
6 # - new dir for gecko extensions in browser-plugins or filesystem package
7
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
12 Version:        1.3.3
13 Release:        2
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+.
21 License:        LGPL v2+
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
32 BuildRequires:  cmake
33 BuildRequires:  gettext-tools
34 BuildRequires:  gtkmm-devel
35 BuildRequires:  libstdc++-devel
36 BuildRequires:  openssl-devel
37 BuildRequires:  p7zip
38 BuildRequires:  pkgconfig
39 BuildRequires:  rpmbuild(macros) >= 1.577
40 BuildRequires:  smartcardpp-devel
41 BuildRequires:  unzip
42 BuildRequires:  zip
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)
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
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.
71
72 %prep
73 %setup -qcT
74 # Extract firebreath
75 7z x %{SOURCE0} > /dev/null
76 mv firebreath-%{firebreath_version}/* .
77
78 # Extract esteid-browser-plugin into firebreath's projects/ subdir
79 install -d projects
80 tar xf %{SOURCE1} -C projects
81
82 # Remove bundled libraries
83 %{__rm} -rv src/3rdParty/boost
84 %{__rm} -rv src/libs
85
86 %patch0 -p1
87
88 %build
89 install -d build
90 cd build
91 export CXXFLAGS="%{rpmcxxflags} -fno-strict-aliasing"
92 export CFLAGS="$CXXFLAGS"
93 %cmake .. \
94         -DVERBOSE:BOOL=YES \
95         -DWITH_SYSTEM_BOOST:BOOL=YES
96
97 %{__make}
98
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102 %{__make} -C build install \
103         DESTDIR=$RPM_BUILD_ROOT
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
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}
112
113 %find_lang esteid-browser-plugin
114
115 %clean
116 rm -rf $RPM_BUILD_ROOT
117
118 %post
119 %update_browser_plugins
120
121 %postun
122 if [ "$1" = 0 ]; then
123         %update_browser_plugins
124 fi
125
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}
This page took 0.067568 seconds and 3 git commands to generate.