summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--enigmail-fixlang.php91
-rwxr-xr-xmozilla-extension-update.sh144
-rw-r--r--thunderbird-enigmail.spec27
-rw-r--r--xulrunner-10.0-gcc47.patch38
4 files changed, 51 insertions, 249 deletions
diff --git a/enigmail-fixlang.php b/enigmail-fixlang.php
deleted file mode 100644
index 188b558..0000000
--- a/enigmail-fixlang.php
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/usr/bin/php
-<?php
-function loaddtd ($file, &$tab) {
-
- echo "+ Loading $file\n";
- $tab=array();
-
- $fic=fopen($file, "r");
- $prev=false;
- if ($fic) while ($buf=fgets($fic)) {
- if (empty($buf) || $buf=="\n") {
- //echo "+ empty\n";
- } else if (preg_match('/^<!ENTITY (.*)"(.*)">$/', $buf, $res)) {
- //echo "+ Line '".$res[1]."'\n";
- $ind=trim($res[1]);
- $tab[$ind] = $res[1].'"'.$res[2].'">';
- $prev=false;
- } else if (preg_match('/^<!ENTITY (.*)"(.*)$/', $buf, $res)) {
- //echo "+ Start '".$res[1]."'\n";
- $ind=trim($res[1]);
- $tab[$ind] = $res[1].'"'.$res[2];
- $prev=$ind;
- } else if ($prev && preg_match('/^(.*)">$/', $buf, $res)) {
- //echo "+ End '".$prev."'\n";
- $tab[$prev] .= "\n".$res[1].'">';
- $prev=false;
- } else if ($prev && preg_match('/^(.*)$/', $buf, $res)) {
- //echo "+ Cont. '".$prev."'\n";
- $tab[$prev] .= "\n".$res[1];
- } else {
- die("- unkonwn ($buf) !\n");
- }
- }
-}
-function loadprop ($file, &$tab) {
-
- echo "+ Loading $file\n";
- $tab=array();
-
- $fic=fopen($file, "r");
- if ($fic) while ($buf=fgets($fic)) {
- if (empty($buf) || $buf=="\n") {
- //echo "+ empty\n";
- } else if (preg_match('/^#/', $buf, $res)) {
- //echo "+ comments\n";
- } else if (preg_match('/^([A-Za-z0-9._]*)[[:space:]]*=[[:space:]]*(.*)/', $buf, $res)) {
- //echo "+ Value '".$res[1]."'\n";
- $ind=trim($res[1]);
- $tab[$ind] = $res[1].'='.$res[2];
- } else {
- echo("\tIgnored ($buf) !\n");
- }
- }
-}
-if ($_SERVER["argc"]<3) die ("usage enigmail-fixlang.php fromdir destdir\n");
-$from=$_SERVER["argv"][1];
-$dest=$_SERVER["argv"][2];
-if (!is_file("$from/enigmail.dtd")) die ("$from/enigmail.dtd not found\n");
-if (!is_file("$from/enigmail.properties")) die ("$from/enigmail.properties not found\n");
-if (!is_file("$dest/enigmail.dtd")) die ("$dest/enigmail.dtd not found\n");
-if (!is_file("$dest/enigmail.properties")) die ("$dest/enigmail.properties not found\n");
-
-loaddtd("$from/enigmail.dtd", $endtd);
-loaddtd("$dest/enigmail.dtd", $frdtd);
-
-echo "+ Writing $dest/enigmail.dtd\n";
-$fic=fopen("$dest/enigmail.dtd", "w");
-foreach($endtd as $ind => $line)
- if (isset($frdtd[$ind])) {
- fputs($fic, "<!ENTITY ".$frdtd[$ind]."\n");
- } else {
- echo "\tAdding missing $ind\n";
- fputs($fic, "<!ENTITY ".$endtd[$ind]."\n");
- }
-fclose($fic);
-
-loadprop("$from/enigmail.properties", $enprop);
-loadprop("$dest/enigmail.properties", $frprop);
-
-echo "+ Writing $dest/enigmail.properties\n";
-$fic=fopen("$dest/enigmail.properties", "w");
-foreach($enprop as $ind => $line)
- if (isset($frprop[$ind])) {
- fputs($fic, $frprop[$ind]."\n");
- } else {
- echo "\tAdding missing $ind\n";
- fputs($fic, $enprop[$ind]."\n");
- }
-fclose($fic);
-?>
-
diff --git a/mozilla-extension-update.sh b/mozilla-extension-update.sh
deleted file mode 100755
index 1bf15a6..0000000
--- a/mozilla-extension-update.sh
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/bin/sh
-#
-# This script is used to add and remove our extension from one of the Mozilla
-# products directory, and is run from 'triggers' when the product is installed or
-# upgraded, as well as when our package is installed. It is needed because
-# Mozilla products are installed into versioned directories in /usr/lib[64]/<product>
-# so we have to make a new symlink into the right directory when the
-# application is installed or upgraded. But we would rather not leave
-# our old symlinks behind, since that will cause the application
-# directories not to be removed. (flash-player leaves its old symlinks behind,
-# but that's no excuse for us to do the same...)
-#
-# Because I don't know any way of finding out what the new version
-# is on installation or old version on uninstallation, we have
-# to do things in a somewhat non-intuitive way
-#
-# The order on upgrade of the mozilla application is:
-#
-# 1. new package installed
-# 2. triggerin for new package - we add all symlinks
-# 3. triggerun for old package - we remove all symlinks
-# 4. old package uninstalled
-# 5. triggerpostun for old package - we add all symlinks
-#
-# Triggers are also run on self-upgrade, in that case we do:
-#
-# 1. new package installed
-# 2. triggerin for new package - we add all symlinks
-# 3. triggerun for old package - we remove all symlinks
-# 4. old package uninstalled
-# 5. postun for old package - we add all symlinks
-# 6. triggerpostun for old package - NOT RUN (contrary to RPM docs)
-#
-#
-# Script arguments:
-# --appname: the mozilla application that this extension should register into.
-# Usually firefox or thunderbird.
-# --extname: the name of the extension. It can be determined by looking at
-# the install.rdf file, in the extension directory. This file
-# contains several <em:id> tags. The extname parameter is the
-# content of the em:id tag which is not contained in the
-# em:targetApplication tag
-# --extpath: the path where the extension will be installed
-# --action: either "install" or "remove"
-# --basedir: the dirname of the directory where the target application is
-# installed. Usually /usr/lib or /usr/lib64>, it defaults to
-# /usr/lib
-#
-#
-# Here's an example implementation in rpm scriptlets:
-#
-# %define tbupdate %{_libdir}/lightning/mozilla-extension-update.sh --appname thunderbird --extname {e2fda1a4-762b-4020-b5ad-a41df1933103} --basedir %{_libdir} --extpath %{_libdir}/lightning --action
-#
-# %post
-# %{tbupdate} install || true
-#
-# %preun
-# # On removal (but not upgrade), remove the extention
-# if [ $1 = 0 ] ; then
-# %{tbupdate} remove || true
-# fi
-#
-# %postun
-# # This is needed not to reverse the effect of our preun, which
-# # is guarded against upgrade, but because of our triggerun,
-# # which is run on self-upgrade, though triggerpostun isn't
-# if [ $1 != 0 ] ; then
-# %{tbupdate} install || true
-# fi
-#
-# %triggerin -- thunderbird
-# %{tbupdate} install || true
-#
-# %triggerun -- thunderbird
-# %{tbupdate} remove || true
-#
-# %triggerpostun -- thunderbird
-# # Guard against being run post-self-uninstall, even though that
-# # doesn't happen currently (see comment above)
-# if [ "$1" != 0 ] ; then
-# %{tbupdate} install || true
-# fi
-
-
-die() {
- echo >&2 "$@"
- exit 0
-}
-
-usage() {
- die "Usage: $0 --appname <application-name> --extname <extension-name> --extpath <extension-path> --action <install|remove> [--basedir </usr/lib|/usr/lib64>]"
-}
-
-appname=
-extname=
-extpath=
-action=
-basedir=/usr/lib
-while [ "$#" -gt "0" ]; do
- case "$1" in
- --appname)
- shift; appname="$1" ;;
- --extname)
- shift; extname="$1" ;;
- --extpath)
- shift; extpath="$1" ;;
- --action)
- shift; action="$1" ;;
- --basedir)
- shift; basedir="$1" ;;
- *) usage ;;
- esac
- shift
-done
-
-
-if [ "$action" = "install" ] ; then
- # Add symlinks to any mozilla directory that looks like it is part of a
- # currently installed package
- for d in $basedir/${appname}*; do
- if [ "$d" = "$basedir/${appname}*" ] ; then
- continue
- fi
- link=$d/extensions/$extname
- if [ -e $extpath -a -e $d/$appname-bin -a -d $d/extensions -a ! -L $link ] ; then
- ln -s $extpath $link
- fi
- done
-elif [ "$action" = "remove" ] ; then
- # Remove any symlinks we've created into any mozilla directory
- for d in $basedir/${appname}*; do
- if [ "$d" = "$basedir/${appname}*" ] ; then
- continue
- fi
- link=$d/extensions/$extname
- if [ -L $link ] ; then
- rm $link
- fi
- done
-else
- usage
-fi
-
-exit 0
diff --git a/thunderbird-enigmail.spec b/thunderbird-enigmail.spec
index 989fe58..5438219 100644
--- a/thunderbird-enigmail.spec
+++ b/thunderbird-enigmail.spec
@@ -14,7 +14,7 @@
%define system_sqlite 1
%endif
-%global thunver 10.0
+%global thunver 10.0.2
%global thunmax 11.0
# The tarball is pretty inconsistent with directory structure.
@@ -33,7 +33,7 @@
Summary: Authentication and encryption extension for Mozilla Thunderbird
Name: thunderbird-enigmail
-Version: 1.3.5
+Version: 1.4
%if 0%{?prever:1}
Release: 0.1.%{prever}%{?dist}
%else
@@ -59,9 +59,6 @@ Source100: enigmail-%{CVS}.tgz
Source100: http://www.mozilla-enigmail.org/download/source/enigmail-%{version}%{?prever}.tar.gz
%endif
-# http://www.mozdev.org/pipermail/enigmail/2009-April/011018.html
-Source101: enigmail-fixlang.php
-
# Mozilla (XULRunner) patches
Patch0: thunderbird-install-dir.patch
@@ -128,7 +125,7 @@ BuildRequires: GConf2-devel
BuildRequires: lcms-devel >= %{lcms_version}
## For fixing lang
-BuildRequires: dos2unix, php-cli
+BuildRequires: perl
# Without this enigmmail will require libxpcom.so and other .so
@@ -231,9 +228,7 @@ popd
pushd mailnews/extensions/enigmail
for rep in $(cat lang/current-languages.txt)
do
- dos2unix lang/$rep/enigmail.dtd
- dos2unix lang/$rep/enigmail.properties
- php %{SOURCE101} ui/locale/en-US lang/$rep
+ perl util/fixlang.pl ui/locale/en-US lang/$rep
done
popd
@@ -284,16 +279,16 @@ popd
%install
cd %{tarballdir}
-%{__rm} -rf $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
-%{__mkdir_p} $RPM_BUILD_ROOT%{enigmail_extname}
+mkdir -p $RPM_BUILD_ROOT%{enigmail_extname}
-%{__unzip} -q mozilla/dist/bin/enigmail-*-linux-*.xpi -d $RPM_BUILD_ROOT%{enigmail_extname}
-%{__chmod} +x $RPM_BUILD_ROOT%{enigmail_extname}/wrappers/*.sh
+unzip -q mozilla/dist/bin/enigmail-*-linux-*.xpi -d $RPM_BUILD_ROOT%{enigmail_extname}
+chmod +x $RPM_BUILD_ROOT%{enigmail_extname}/wrappers/*.sh
%clean
-%{__rm} -rf $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
%files
@@ -304,6 +299,10 @@ cd %{tarballdir}
#===============================================================================
%changelog
+* Sat Mar 03 2012 Remi Collet <remi@fedoraproject.org> 1.4-1
+- Enigmail 1.4 for Thunderbird 10.0.2
+- using upstream fixlang.pl instead of our fixlang.php
+
* Tue Jan 31 2012 Remi Collet <remi@fedoraproject.org> 1.3.5-1
- Enigmail 1.3.5 for Thunderbird 10.0
diff --git a/xulrunner-10.0-gcc47.patch b/xulrunner-10.0-gcc47.patch
index 91a948a..7efbfba 100644
--- a/xulrunner-10.0-gcc47.patch
+++ b/xulrunner-10.0-gcc47.patch
@@ -23,3 +23,41 @@ diff -up mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 mozilla-bet
ifeq ($(OS_ARCH),WINNT)
CPPSRCS += crashreporter_win.cpp
LIBS += \
+diff -up mozilla-beta/ipc/chromium/src/base/file_util_linux.cc.file mozilla-beta/ipc/chromium/src/base/file_util_linux.cc
+--- mozilla-beta/ipc/chromium/src/base/file_util_linux.cc.file 2012-01-24 09:00:00.000000000 +0100
++++ mozilla-beta/ipc/chromium/src/base/file_util_linux.cc 2012-01-25 15:30:43.707796295 +0100
+@@ -5,6 +5,9 @@
+ #include "base/file_util.h"
+
+ #include <fcntl.h>
++#if defined(ANDROID) || defined(OS_POSIX)
++#include <unistd.h>
++#endif
+
+ #include <string>
+ #include <vector>
+diff -up mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.file mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc
+--- mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.file 2012-01-24 09:00:00.000000000 +0100
++++ mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc 2012-01-25 15:13:11.947771212 +0100
+@@ -6,6 +6,9 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
++#if defined(ANDROID) || defined(OS_POSIX)
++#include <unistd.h>
++#endif
+
+ #include "eintr_wrapper.h"
+ #include "base/logging.h"
+diff -up mozilla-beta/ipc/chromium/src/base/file_util.cc.old mozilla-beta/ipc/chromium/src/base/file_util.cc
+--- mozilla-beta/ipc/chromium/src/base/file_util.cc.old 2012-01-25 13:48:11.000000000 +0100
++++ mozilla-beta/ipc/chromium/src/base/file_util.cc 2012-01-25 13:52:25.096659244 +0100
+@@ -8,7 +8,7 @@
+ #include <io.h>
+ #endif
+ #include <stdio.h>
+-#if defined(ANDROID)
++#if defined(ANDROID) || defined(OS_POSIX)
+ #include <unistd.h>
+ #endif
+