[mozvoikko] Package the noarch JavaScript version of the extension, obsolete the old arch-specific 1.9 versions.

Ville-Pekka Vainio vpv at fedoraproject.org
Sun Oct 30 17:22:49 UTC 2011


commit 6625b4f2a07aea6eb4bde8ddbefd2b8e71b6860f
Author: Ville-Pekka Vainio <vpvainio at iki.fi>
Date:   Sun Oct 30 19:22:37 2011 +0200

    Package the noarch JavaScript version of the extension, obsolete the old
    arch-specific 1.9 versions.

 .gitignore     |    1 +
 mozvoikko.spec |   78 ++++++++++++++++++++++++++------------------------------
 sources        |    2 +-
 3 files changed, 38 insertions(+), 43 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 bf27892..64fec9a 100644
--- a/mozvoikko.spec
+++ b/mozvoikko.spec
@@ -1,17 +1,11 @@
-# For the xulrunner unstable requires
-%define gecko_ver 6.0
+# TODO: symlink to the Thunderbird extension directory
 # These come from install.rdf
 %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 mozvoikko_ext_id \{b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a\}
 
 Name:           mozvoikko
-Version:        1.9.0
-Release:        6%{?dist}
+Version:        2.0
+Release:        1%{?dist}
 Summary:        Finnish Voikko spell-checker extension for Mozilla programs
 Group:          Applications/Internet
 License:        GPLv2+
@@ -19,55 +13,55 @@ 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.
+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
+# Only packaged for Firefox for now
 Requires:       firefox
+# 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
-
+install -dm 755 \
+    $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_app_id}/%{mozvoikko_ext_id}/components
+install -pm 644 components/MozVoikko2.js \
+    $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_app_id}/%{mozvoikko_ext_id}/components/MozVoikko2.js
+install -pm 644 chrome.manifest \
+    $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_app_id}/%{mozvoikko_ext_id}/chrome.manifest
+install -pm 644 install.rdf \
+    $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_app_id}/%{mozvoikko_ext_id}/install.rdf
 
 %files
 %defattr(-,root,root,-)
 %doc ChangeLog COPYING README
-%{_libdir}/mozilla/extensions/%{firefox_app_id}/%{firefox_ext_id}
-
+%{_datadir}/mozilla/extensions/%{firefox_app_id}/%{mozvoikko_ext_id}
 
 %changelog
+* 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
+
+* Tue Sep 27 2011 Jan Horak <jhorak at redhat.com> - 1.9.0-8
+- Rebuild against newer gecko
+
+* Tue Sep 06 2011 Jan Horak <jhorak at redhat.com> - 1.9.0-7
+- Rebuild against newer gecko
+
 * Wed Aug 17 2011 Jan Horak <jhorak at redhat.com> - 1.9.0-6
 - 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