]>
Commit | Line | Data |
---|---|---|
0118d3d5 ER |
1 | %define extension gnome-keyring |
2 | Summary: Extension that enables Gnome Keyring integration | |
3 | Name: mozilla-addon-%{extension} | |
727308a1 | 4 | Version: 0.6.11 |
d49371cd | 5 | Release: 7 |
8519529a | 6 | License: MPL v1.1 or GPL v2+ or LGPL v2.1+ |
0118d3d5 | 7 | Group: X11/Applications/Networking |
562f3955 | 8 | Source0: https://github.com/infinity0/mozilla-gnome-keyring/archive/%{version}/%{name}-%{version}.tar.gz |
727308a1 | 9 | # Source0-md5: f6abf2e5bc5de7ad3472998bfd68a763 |
8dffe3f5 | 10 | Patch0: firefox-32.patch |
5b2bcb78 | 11 | Patch1: firefox-33.patch |
834f7219 | 12 | URL: https://github.com/infinity0/mozilla-gnome-keyring/ |
9a226b95 | 13 | BuildRequires: libgnome-keyring-devel >= 3.4.0 |
0118d3d5 ER |
14 | BuildRequires: libstdc++-devel |
15 | BuildRequires: pkg-config | |
0118d3d5 | 16 | BuildRequires: xulrunner-devel |
834f7219 | 17 | BuildRequires: zip |
9a226b95 | 18 | Requires: libgnome-keyring >= 3.4.0 |
0118d3d5 ER |
19 | ExclusiveArch: %{x8664} %{ix86} |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | # this comes from install.rdf | |
23 | %define extension_id \{6f9d85e0-794d-11dd-ad8b-0800200c9a66\} | |
24 | %define extensionsdir %{_libdir}/mozilla/extensions | |
834f7219 ER |
25 | |
26 | # https://developer.mozilla.org/en/XPCOM_ABI#ABI_Naming | |
27 | %define platform unknown | |
28 | %ifarch %{ix86} | |
29 | %define platform Linux_x86-gcc3 | |
30 | %endif | |
31 | %ifarch %{x8664} | |
32 | %define platform Linux_x86_64-gcc3 | |
33 | %endif | |
0118d3d5 ER |
34 | |
35 | %description | |
36 | This extension replaces the default password manager in both Firefox | |
37 | and Thunderbird with an implementation which stores the passwords in | |
38 | Gnome keyring. | |
39 | ||
40 | This allows for safe storage of passwords without prompting for | |
41 | password after Firefox or Thunderbird has been started. | |
42 | ||
43 | %prep | |
562f3955 | 44 | %setup -qn mozilla-gnome-keyring-%{version} |
8dffe3f5 | 45 | %patch0 -p1 |
5b2bcb78 | 46 | %patch1 -p1 |
0118d3d5 | 47 | |
834f7219 ER |
48 | %{__sed} -i -e '/^CXXFLAGS/ s/$/ $(OPTFLAGS)/' Makefile |
49 | ||
0118d3d5 ER |
50 | %build |
51 | # build ext for current arch only | |
fb81eb78 | 52 | %{__make} build-xpi \ |
834f7219 | 53 | PLATFORM=%{platform} \ |
fb81eb78 | 54 | VERSION=%{version} \ |
562f3955 | 55 | XUL_VER_MIN=17.0 \ |
0118d3d5 | 56 | CXX="%{__cxx}" \ |
9f30ad56 | 57 | LDFLAGS="%{rpmldflags}" \ |
dfe4d364 | 58 | OPTFLAGS="%{rpmcxxflags} -fpermissive" |
0118d3d5 ER |
59 | |
60 | %install | |
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} | |
65 | ||
66 | %clean | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
73d51661 ER |
69 | %triggerin -- icedove |
70 | test -L %{_libdir}/icedove/extensions/%{extension_id} || \ | |
71 | ln -sf %{extensionsdir}/%{extension_id} %{_libdir}/icedove/extensions/%{extension_id} | |
72 | ||
73 | %triggerun -- icedove | |
74 | if [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L %{_libdir}/icedove/extensions/%{extension_id} ]; then | |
75 | rm -f %{_libdir}/icedove/extensions/%{extension_id} | |
76 | fi | |
77 | ||
0118d3d5 ER |
78 | %files |
79 | %defattr(644,root,root,755) | |
80 | %dir %{extensionsdir}/%{extension_id} | |
9f30ad56 | 81 | %{extensionsdir}/%{extension_id}/chrome |
0118d3d5 | 82 | %{extensionsdir}/%{extension_id}/chrome.manifest |
9f30ad56 | 83 | %{extensionsdir}/%{extension_id}/defaults |
0118d3d5 ER |
84 | %{extensionsdir}/%{extension_id}/install.rdf |
85 | %dir %{extensionsdir}/%{extension_id}/platform | |
fb81eb78 ER |
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 |