[mozvoikko/f15] 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:50:10 UTC 2011
commit f424e113983fd495764538960f44eefe2499f42f
Author: Ville-Pekka Vainio <vpvainio at iki.fi>
Date: Sat Nov 19 13:50:00 2011 +0200
Use the same macros as the mozilla-adblockplus package
Add support for Thunderbird by symlinking the extension from Firefox
.gitignore | 1 +
mozvoikko.spec | 89 ++++++++++++++++++++++++++------------------------------
sources | 2 +-
3 files changed, 43 insertions(+), 49 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 494e1fc..617abfc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
mozvoikko-1.0.tar.gz
/mozvoikko-1.9.0.tar.gz
/mozvoikko-1.9.0.tar.bz2
+/mozvoikko-2.0.tar.gz
diff --git a/mozvoikko.spec b/mozvoikko.spec
index f8c384d..39ba16f 100644
--- a/mozvoikko.spec
+++ b/mozvoikko.spec
@@ -1,17 +1,15 @@
-# For the xulrunner unstable requires
-%define gecko_ver 8.0
-# These come from install.rdf
+%global moz_ext_dir %{_datadir}/mozilla/extensions
+
%global firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
-%global firefox_ext_id \{b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a\}
-# These requires are hardcoded in the sources
-%global libvoikko libvoikko.so.1
-%ifarch x86_64 ppc64 ia64 sparc64 s390x
-%global mark64 ()(64bit)
-%endif
+%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: 1.9.0
-Release: 10%{?dist}
+Version: 2.0
+Release: 2%{?dist}
Summary: Finnish Voikko spell-checker extension for Mozilla programs
Group: Applications/Internet
License: GPLv2+
@@ -19,57 +17,52 @@ URL: http://voikko.sourceforge.net
# Usual format of test release URLs
#Source0: http://www.puimula.org/htp/testing/%{name}-%{version}rc1.tar.gz
# Usual format of stable release URLs
-#Source0: http://downloads.sourceforge.net/voikko/%{name}-%{version}.tar.gz
-# 1.9.0 is a test release, available from an unusual URL
-Source0: http://ap1.pp.fi/mozilla/mozvoikko/1.9.0/%{name}-%{version}.tar.bz2
-# From upstream mailing list, will probably be applied to SVN at some point
-Patch0: %{name}-%{version}-xulrunner-includes-linking.patch
-Patch1: mozvoikko-dict.patch
-
-# For xulrunner unstable
-BuildRequires: gecko-devel-unstable >= %{gecko_ver}
-BuildRequires: libvoikko-devel
-BuildRequires: pkgconfig
-# For xulrunner unstable
-Requires: gecko-libs >= %{gecko_ver}
-Requires: %{libvoikko}%{?mark64}
-# As long as Firefox is the only program which can use the extension,
-# we may as well require it, since this package is quite useless without it.
-Requires: firefox
+Source0: http://downloads.sourceforge.net/voikko/%{name}-%{version}.tar.gz
+
+BuildArch: noarch
+# Owns the needed directories
+Requires: mozilla-filesystem
+# Require the spell-checking library
+Requires: libvoikko
+# Obsolete the old arch-specific 1.9 series
+Obsoletes: %{name} < 1.9.0-100
%description
This is mozvoikko, an extension for Mozilla programs for using the Finnish
spell-checker Voikko.
-
%prep
-%setup -q -n mozvoikko
-%patch0 -p1
-%patch1 -p1
-
-%build
-make -f Makefile.xulrunner extension-files CFLAGS="$RPM_OPT_FLAGS -std=gnu++0x -fno-strict-aliasing" \
- CC_LINK="g++ -shared -Wl,--no-undefined $RPM_OPT_FLAGS" %{?_smp_mflags}
-
+%setup -q
%install
-rm -rf $RPM_BUILD_ROOT
-make -f Makefile.xulrunner install-unpacked \
- DESTDIR=$RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{firefox_app_id}
-# Make the .so executable, so debuginfo can be stripped
-chmod +x \
- $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{firefox_app_id}/%{firefox_ext_id}/components/*.so
-
+rm -rf %{buildroot}
+install -dm 755 \
+ %{buildroot}%{inst_dir}/components
+install -pm 644 components/MozVoikko2.js \
+ %{buildroot}%{inst_dir}/components/MozVoikko2.js
+install -pm 644 chrome.manifest \
+ %{buildroot}%{inst_dir}/chrome.manifest
+install -pm 644 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
-%{_libdir}/mozilla/extensions/%{firefox_app_id}/%{firefox_ext_id}
-
+%{inst_dir}
+%{thunderbird_inst_dir}
%changelog
-* Tue Nov 08 2011 Jan Horak <jhorak at redhat.com> - 1.9.0-10
-- Rebuild against newer gecko
+* 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.
* Mon Oct 03 2011 Jan Horak <jhorak at redhat.com> - 1.9.0-9
- Rebuild against newer gecko
diff --git a/sources b/sources
index 9dcf33e..34da6f5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-08ea3a84d6a7e973e83d02a2d26a6254 mozvoikko-1.9.0.tar.bz2
+b9bb14bdea2977deeafad3c29f692ac6 mozvoikko-2.0.tar.gz
More information about the scm-commits
mailing list