1 %define extension gnome-keyring
2 Summary: Extension that enables Gnome Keyring integration
3 Name: mozilla-addon-%{extension}
6 License: MPL v1.1 or GPL v2+ or LGPL v2.1+
7 Group: X11/Applications/Networking
8 Source0: https://github.com/infinity0/mozilla-gnome-keyring/archive/%{version}/%{name}-%{version}.tar.gz
9 # Source0-md5: f6abf2e5bc5de7ad3472998bfd68a763
10 Patch0: firefox-32.patch
11 Patch1: firefox-33.patch
12 URL: https://github.com/infinity0/mozilla-gnome-keyring/
13 BuildRequires: libgnome-keyring-devel >= 3.4.0
14 BuildRequires: libstdc++-devel
15 BuildRequires: pkg-config
16 BuildRequires: xulrunner-devel
18 Requires: libgnome-keyring >= 3.4.0
19 ExclusiveArch: %{x8664} %{ix86}
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 # this comes from install.rdf
23 %define extension_id \{6f9d85e0-794d-11dd-ad8b-0800200c9a66\}
24 %define extensionsdir %{_libdir}/mozilla/extensions
26 # https://developer.mozilla.org/en/XPCOM_ABI#ABI_Naming
27 %define platform unknown
29 %define platform Linux_x86-gcc3
32 %define platform Linux_x86_64-gcc3
36 This extension replaces the default password manager in both Firefox
37 and Thunderbird with an implementation which stores the passwords in
40 This allows for safe storage of passwords without prompting for
41 password after Firefox or Thunderbird has been started.
44 %setup -qn mozilla-gnome-keyring-%{version}
48 %{__sed} -i -e '/^CXXFLAGS/ s/$/ $(OPTFLAGS)/' Makefile
51 # build ext for current arch only
53 PLATFORM=%{platform} \
57 LDFLAGS="%{rpmldflags}" \
58 OPTFLAGS="%{rpmcxxflags} -fpermissive"
61 rm -rf $RPM_BUILD_ROOT
62 # Install Gecko extension
63 install -d $RPM_BUILD_ROOT%{extensionsdir}/%{extension_id}
64 cp -a xpi/* $RPM_BUILD_ROOT%{extensionsdir}/%{extension_id}
67 rm -rf $RPM_BUILD_ROOT
70 test -L %{_libdir}/icedove/extensions/%{extension_id} || \
71 ln -sf %{extensionsdir}/%{extension_id} %{_libdir}/icedove/extensions/%{extension_id}
74 if [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L %{_libdir}/icedove/extensions/%{extension_id} ]; then
75 rm -f %{_libdir}/icedove/extensions/%{extension_id}
79 %defattr(644,root,root,755)
80 %dir %{extensionsdir}/%{extension_id}
81 %{extensionsdir}/%{extension_id}/chrome
82 %{extensionsdir}/%{extension_id}/chrome.manifest
83 %{extensionsdir}/%{extension_id}/defaults
84 %{extensionsdir}/%{extension_id}/install.rdf
85 %dir %{extensionsdir}/%{extension_id}/platform
86 %dir %{extensionsdir}/%{extension_id}/platform/%{platform}
87 %dir %{extensionsdir}/%{extension_id}/platform/%{platform}/components
88 %attr(755,root,root) %{extensionsdir}/%{extension_id}/platform/%{platform}/components/libgnomekeyring.so