[mozvoikko] Use the same macros as the mozilla-adblockplus package Add support for Thunderbird by symlinking the
Ville-Pekka Vainio
vpv at fedoraproject.org
Sat Nov 19 11:36:41 UTC 2011
commit 194c7099e0b85f173146de33772a3f2bbd3ecf07
Author: Ville-Pekka Vainio <vpvainio at iki.fi>
Date: Sat Nov 19 13:36:26 2011 +0200
Use the same macros as the mozilla-adblockplus package
Add support for Thunderbird by symlinking the extension from Firefox
mozvoikko.spec | 35 +++++++++++++++++++++++------------
1 files changed, 23 insertions(+), 12 deletions(-)
---
diff --git a/mozvoikko.spec b/mozvoikko.spec
index 64fec9a..39ba16f 100644
--- a/mozvoikko.spec
+++ b/mozvoikko.spec
@@ -1,11 +1,15 @@
-# TODO: symlink to the Thunderbird extension directory
-# These come from install.rdf
+%global moz_ext_dir %{_datadir}/mozilla/extensions
+
%global firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
-%global mozvoikko_ext_id \{b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a\}
+%global src_ext_id \{b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a\}
+%global inst_dir %{moz_ext_dir}/%{firefox_app_id}/%{src_ext_id}
+
+%global thunderbird_app_id \{3550f703-e582-4d05-9a08-453d09bdfdc6\}
+%global thunderbird_inst_dir %{moz_ext_dir}/%{thunderbird_app_id}/%{src_ext_id}
Name: mozvoikko
Version: 2.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Finnish Voikko spell-checker extension for Mozilla programs
Group: Applications/Internet
License: GPLv2+
@@ -20,8 +24,6 @@ BuildArch: noarch
Requires: mozilla-filesystem
# Require the spell-checking library
Requires: libvoikko
-# Only packaged for Firefox for now
-Requires: firefox
# Obsolete the old arch-specific 1.9 series
Obsoletes: %{name} < 1.9.0-100
@@ -33,22 +35,31 @@ spell-checker Voikko.
%setup -q
%install
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
install -dm 755 \
- $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_app_id}/%{mozvoikko_ext_id}/components
+ %{buildroot}%{inst_dir}/components
install -pm 644 components/MozVoikko2.js \
- $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_app_id}/%{mozvoikko_ext_id}/components/MozVoikko2.js
+ %{buildroot}%{inst_dir}/components/MozVoikko2.js
install -pm 644 chrome.manifest \
- $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_app_id}/%{mozvoikko_ext_id}/chrome.manifest
+ %{buildroot}%{inst_dir}/chrome.manifest
install -pm 644 install.rdf \
- $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_app_id}/%{mozvoikko_ext_id}/install.rdf
+ %{buildroot}%{inst_dir}/install.rdf
+
+# Symlink from the Thunderbird extension to the Firefox extension
+mkdir -p %{buildroot}%{moz_ext_dir}/%{thunderbird_app_id}
+ln -s %{inst_dir} %{buildroot}%{thunderbird_inst_dir}
%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING README
-%{_datadir}/mozilla/extensions/%{firefox_app_id}/%{mozvoikko_ext_id}
+%{inst_dir}
+%{thunderbird_inst_dir}
%changelog
+* Sat Nov 05 2011 Ville-Pekka Vainio <vpvainio AT iki.fi> - 2.0-2
+- Use the same macros as the mozilla-adblockplus package
+- Add support for Thunderbird by symlinking the extension from Firefox
+
* Sun Oct 30 2011 Ville-Pekka Vainio <vpvainio AT iki.fi> - 2.0-1
- Package the noarch JavaScript version of the extension, obsolete the old
arch-specific 1.9 versions.
More information about the scm-commits
mailing list