%define oname mozvoikko %define tb_extdir %{_datadir}/mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6} %define iceape_extdir %{_datadir}/mozilla/extensions/{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} Summary: Finnish spell-checking extension for Mozilla applications Name: firefox-ext-mozvoikko Version: 2.0.1 Release: %mkrel 2 License: GPLv2+ Group: Networking/WWW URL: http://voikko.sourceforge.net/ Source: http://downloads.sourceforge.net/voikko/%oname-%version.tar.gz BuildRequires: zip BuildRequires: firefox-devel BuildArch: noarch Provides: %{oname} = %{version}-%{release} Requires: libvoikko >= 1.7 Requires: voikko-fi Requires: locales-fi %description Finnish spell-checking extension for Firefox, Thunderbird and Iceape. The spell-checking is provided by the Voikko library. %prep %setup -q -n %oname-%version sed -i "s|<em:maxVersion>[^<]*</em:maxVersion>|<em:maxVersion>*</em:maxVersion>|g" install.rdf %build %make %install mkdir -p %{buildroot}%{firefox_extdir} hash="$(sed -n '/.*em:id="\(.*\)"/{s//\1/p;q}' install.rdf)" if [ -z "$hash" ]; then hash="$(sed -n '/.*em:id>\(.*\)<\/em:id>.*/{s//\1/p;q}' install.rdf)" fi if [ -z "$hash" ]; then echo "Failed to find plugin hash." exit 1 fi install -d -m0755 %{buildroot}%{firefox_extdir}/$hash unzip *.xpi -d %{buildroot}%{firefox_extdir}/$hash for dir in %{tb_extdir} %{iceape_extdir}; do install -d -m0755 %{buildroot}$dir ln -s %{firefox_extdir}/$hash %{buildroot}$dir/$hash done %files %doc ChangeLog # own these directories as any one of them may not be installed -Anssi %{firefox_extdir} %{tb_extdir} %{iceape_extdir} %changelog * Fri Jan 11 2013 umeabot <umeabot> 2.0.1-2.mga3 + Revision: 350417 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild + anssi <anssi> - add Provides for the upstream name "mozvoikko" * Sun Feb 12 2012 anssi <anssi> 2.0.1-1.mga2 + Revision: 208199 - new version 2.0.1 - drop maxVersion from install.rdf, it is no longer dropped by Makefile - install the extension as unzipped - install the extension also for thunderbird and iceape (via symlink), and drop the requirement on firefox * Wed Dec 21 2011 fwang <fwang> 2.0-1.mga2 + Revision: 185415 - br zip - upload tarball - new version 2.0 (js based) * Tue Sep 06 2011 fwang <fwang> 1.10.0-4.mga2 + Revision: 139031 - drop cheat on ff version, not needed - install into systemwide ff ext dir * Mon Sep 05 2011 fwang <fwang> 1.10.0-3.mga2 + Revision: 138564 - support ff6 * Wed Aug 31 2011 anssi <anssi> 1.10.0-2.mga2 + Revision: 137272 - remove firefox version number from description * Wed Aug 31 2011 anssi <anssi> 1.10.0-1.mga2 + Revision: 137248 - remove firefox version from summary - new version - fix build with current xulrunner - use %%ldflags - imported package firefox-ext-mozvoikko