[thunderbird-enigmail/f20] Enigmail 1.7

Remi Collet remi at fedoraproject.org
Tue Jul 15 14:29:04 UTC 2014


commit 3e5a857bb7f3342631d7750080ad284a1992beea
Author: Remi Collet <remi at fedoraproject.org>
Date:   Tue Jul 15 16:29:24 2014 +0200

    Enigmail 1.7

 .gitignore                |   16 +--
 sources                   |    3 +-
 thunderbird-enigmail.spec |  305 +++++++--------------------------------------
 3 files changed, 49 insertions(+), 275 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index d13a782..8a9730a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,4 @@
-*spec~
-/enigmail-1.4.5.tar.gz
-/thunderbird-16.0.1.source.tar.bz2
-/enigmail-1.4.6.tar.gz
-/thunderbird-17.0.source.tar.bz2
-/enigmail-1.5.0.tar.gz
-/enigmail-1.5.1.tar.gz
-/thunderbird-17.0.2.source.tar.bz2
-/enigmail-1.5.2.tar.gz
-/thunderbird-17.0.7.source.tar.bz2
-/thunderbird-24.0.source.tar.bz2
-/enigmail-1.6.tar.gz
+clog
+/enigmail-1.7-611bc95.tar.gz
+/enigmail-1.7-c429d03.tar.gz
+/enigmail-1.7.tar.gz
diff --git a/sources b/sources
index 277a441..4b0201d 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-38f4b2e574751e4e6cbe36dc8b3bce20  thunderbird-24.0.source.tar.bz2
-4a2bbcb020bdb282a660fda8c70d5608  enigmail-1.6.tar.gz
+d938c9ffe5e6992525a8c13aac6f8df6  enigmail-1.7.tar.gz
diff --git a/thunderbird-enigmail.spec b/thunderbird-enigmail.spec
index d05c8d0..f671ef9 100644
--- a/thunderbird-enigmail.spec
+++ b/thunderbird-enigmail.spec
@@ -1,138 +1,44 @@
-# Use system nspr/nss?
-%define system_nss        1
-
-# Build as a debug package?
-%define debug_build       0
-
-%if 0%{?fedora} <= 18
-%define system_sqlite 0
-%else
-%define system_sqlite 1
-%endif
-
-%if %{?system_nss}
-%global nspr_version 4.9.6
-%global nss_version 3.15
-%endif
-
-%define cairo_version 1.10.0
-%define freetype_version 2.1.9
-
-%if %{?system_sqlite}
-%define sqlite_version 3.7.17
-%endif
-
-%define libnotify_version 0.4
-%global libvpx_version 1.0.0
-%define _default_patch_fuzz 2
-
+# spec file for thunderbird-enigmail
+#
+# Copyright (c) 2009-2014 Remi Collet
+# License: CC-BY-SA
+# http://creativecommons.org/licenses/by-sa/3.0/
+#
+# Please, preserve the changelog entries
+#
 %define thunderbird_app_id \{3550f703-e582-4d05-9a08-453d09bdfdc6\} 
 %global enimail_app_id     \{847b3a00-7ab1-11d4-8f02-006008948af5\}
 
-%global thunver  24.0
-
-# The tarball is pretty inconsistent with directory structure.
-# Sometimes there is a top level directory.  That goes here.
-#
-# IMPORTANT: If there is no top level directory, this should be 
-# set to the cwd, ie: '.'
-%define tarballdir comm-esr24
-
-%define official_branding 1
+%global thunmin            24.0
 
-%global mozappdir         %{_libdir}/thunderbird
-%global enigmail_extname  %{_libdir}/mozilla/extensions/%{thunderbird_app_id}/%{enimail_app_id}
+%global enigmail_extname   %{_libdir}/mozilla/extensions/%{thunderbird_app_id}/%{enimail_app_id}
 
+#global gitcommit          c429d039d54c4c1c02b0201c3ed128397390bf18
+#global gitdate            20140709
+#global gitshort           %(c=%{gitcommit}; echo ${c:0:7})
 
 Summary:        Authentication and encryption extension for Mozilla Thunderbird
 Name:           thunderbird-enigmail
-Version:        1.6
-Release:        2%{?dist}
+Version:        1.7
+Release:        1%{?dist}
 URL:            http://enigmail.mozdev.org/
 # All files licensed under MPL 1.1/GPL 2.0/LGPL 2.1
 License:        MPLv1.1 or GPLv2+ or LGPLv2+
 Group:          Applications/Internet
-Source0:        thunderbird-%{thunver}%{?thunbeta}.source.tar.bz2
-Source10:       thunderbird-mozconfig
-Source11:       thunderbird-mozconfig-branded
-
-# ===== Enigmail files =====
-Source100:      http://www.mozilla-enigmail.org/download/source/enigmail-%{version}.tar.gz
-
-
-# Mozilla (XULRunner) patches
-Patch0:         thunderbird-install-dir.patch
-Patch8:         xulrunner-10.0-secondary-ipc.patch
-Patch9:         mozilla-build-arm.patch
-
-# Build patches
-Patch104:       xulrunner-10.0-gcc47.patch
-
-# Linux specific
-Patch200:       thunderbird-8.0-enable-addons.patch
-
-# PPC fixes
-Patch300:       xulrunner-24.0-jemalloc-ppc.patch
-
-# Fedora specific patches
-Patch400:       rhbz-966424.patch
-
-# Enigmail patch
-
-
-%if %{official_branding}
-# Required by Mozilla Corporation
-
+%if 0%{?gitdate}
+# git clone git://git.code.sf.net/p/enigmail/source enigmail-source
+# cd enigmail-source; git checkout c429d03
+# git archive --format=tar.gz --prefix enigmail/ --output ../enigmail-1.7-c429d03.tar.gz --verbose  master
+Source0:        enigmail-%{version}-%{gitshort}.tar.gz
 %else
-# Not yet approved by Mozillla Corporation
-
+Source0:        http://www.mozilla-enigmail.org/download/source/enigmail-%{version}.tar.gz
 %endif
 
-%if %{?system_nss}
-BuildRequires:  nss-static >= %{nss_version}
-BuildRequires:  nspr-devel >= %{nspr_version}
-BuildRequires:  nss-devel >= %{nss_version}
-%endif
-BuildRequires:  cairo-devel >= %{cairo_version}
-BuildRequires:  libnotify-devel >= %{libnotify_version}
-BuildRequires:  libpng-devel
-BuildRequires:  libjpeg-devel
 BuildRequires:  zip
-BuildRequires:  bzip2-devel
-BuildRequires:  zlib-devel
-BuildRequires:  libIDL-devel
-BuildRequires:  gtk2-devel
-BuildRequires:  krb5-devel
-BuildRequires:  pango-devel
-BuildRequires:  freetype-devel >= %{freetype_version}
-BuildRequires:  libXt-devel
-BuildRequires:  libXrender-devel
-BuildRequires:  hunspell-devel
-%if %{?system_sqlite}
-BuildRequires:  sqlite-devel >= %{sqlite_version}
-%endif
-BuildRequires:  startup-notification-devel
-BuildRequires:  alsa-lib-devel
-BuildRequires:  autoconf213
-BuildRequires:  desktop-file-utils
-BuildRequires:  libcurl-devel
-BuildRequires:  mesa-libGL-devel
-BuildRequires:  libvpx-devel >= %{libvpx_version}
-
-## For fixing lang
-BuildRequires:  perl
-
+BuildRequires:  perl >= 5.8
+BuildRequires:  python >= 2.7
 
-# Without this enigmmail will require libxpcom.so and other .so  
-# which are not provided by thunderbird (to avoid mistake, 
-# because provided by xulrunner). 
-AutoReq:  0
-# All others deps already required by thunderbird
-Requires:  gnupg
-Requires:  thunderbird >= %{thunver}
-
-# Nothing usefull provided
-AutoProv: 0
+Requires:  thunderbird >= %{thunmin}
 
 
 %description
@@ -140,163 +46,36 @@ Enigmail is an extension to the mail client Mozilla Thunderbird
 which allows users to access the authentication and encryption
 features provided by GnuPG 
 
-#===============================================================================
 
 %prep
-%setup -q -c
-cd %{tarballdir}
-
-%patch0  -p1 -b .dir
-# Mozilla (XULRunner) patches
-cd mozilla
-%patch8 -p3 -b .secondary-ipc
-%patch9 -p2 -b .arm
-%patch104 -p1 -b .gcc47
-%patch300 -p2 -b .852698
-%patch400 -p1 -b .966424
-cd ..
-
-%patch200 -p1 -b .addons
-
-%if %{official_branding}
-# Required by Mozilla Corporation
-
-%else
-# Not yet approved by Mozilla Corporation
-
-%endif
-
-%{__rm} -f .mozconfig
-%{__cp} %{SOURCE10} .mozconfig
-%if %{official_branding}
-%{__cat} %{SOURCE11} >> .mozconfig
-%endif
-
-%if %{?system_nss}
-echo "ac_add_options --with-system-nspr" >> .mozconfig
-echo "ac_add_options --with-system-nss" >> .mozconfig
-%else
-echo "ac_add_options --without-system-nspr" >> .mozconfig
-echo "ac_add_options --without-system-nss" >> .mozconfig
-%endif
-
-# s390(x) fails to start with jemalloc enabled
-%ifarch s390 s390x
-echo "ac_add_options --disable-jemalloc" >> .mozconfig
-%endif
+%setup -q -n enigmail
 
-%if %{?system_sqlite}
-echo "ac_add_options --enable-system-sqlite"  >> .mozconfig
-%else
-echo "ac_add_options --disable-system-sqlite" >> .mozconfig
-%endif
-
-%if %{?debug_build}
-echo "ac_add_options --enable-debug" >> .mozconfig
-echo "ac_add_options --disable-optimize" >> .mozconfig
-%else
-echo "ac_add_options --disable-debug" >> .mozconfig
-echo "ac_add_options --enable-optimize" >> .mozconfig
-%endif
-
-%ifarch %{arm}
-echo "ac_add_options --disable-elf-hack" >> .mozconfig
-%endif
-
-%ifnarch %{ix86} x86_64
-echo "ac_add_options --disable-webrtc" >> .mozconfig
+%if 0%{?gitdate}
+# Fix displayed version
+sed -e '/em:version/s/1.7/1.7pre/' \
+    -i package/install.rdf
 %endif
 
-# ===== Enigmail work =====
-%if 0%{?CVS}
-mkdir mailnews/extensions/enigmail
-tar xzf %{SOURCE100} -C mailnews/extensions/enigmail
-
-%else
-tar xzf %{SOURCE100} -C mailnews/extensions
-pushd mailnews/extensions/enigmail
-# From: Patrick Brunschwig <patrick at mozilla-enigmail.org>
-# All tarballs (as well as CVS) will *always* report as 1.4a1pre (or whatever
-# the next major version would be). This is because I create builds from trunk
-# and simply label the result as 1.3.x.
-#sed -i -e '/em:version/s/1.6a1pre/%{version}/' package/install.rdf
-grep '<em:version>%{version}</em:version>' package/install.rdf || exit 1
-# Apply Enigmail patch here
-popd
-%endif
-
-# ===== Fixing langpack
-pushd mailnews/extensions/enigmail
-for rep in $(cat lang/current-languages.txt)
-do
-   perl util/fixlang.pl ui/locale/en-US lang/$rep
-done
-popd
-
-#===============================================================================
 
 %build
-cd %{tarballdir}
-
-# -fpermissive is needed to build with gcc 4.6+ which has become stricter
-#
-# Mozilla builds with -Wall with exception of a few warnings which show up
-# everywhere in the code; so, don't override that.
-#
-# Disable C++ exceptions since Mozilla code is not exception-safe
-# 
-MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \
-                      %{__sed} -e 's/-Wall//')
-%if %{?debug_build}
-MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//')
-%endif
-%ifarch s390
-MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/')
-%endif
-%ifarch s390 %{arm} ppc
-MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
-%endif
+# see https://www.enigmail.net/download/build_instructions.php
+%configure
 
-export CFLAGS=$MOZ_OPT_FLAGS
-export CXXFLAGS=$MOZ_OPT_FLAGS
-export LDFLAGS=$MOZ_LINK_FLAGS
-
-export PREFIX='%{_prefix}'
-export LIBDIR='%{_libdir}'
-
-MOZ_SMP_FLAGS=-j1
-# On x86 architectures, Mozilla can build up to 4 jobs at once in parallel,
-# however builds tend to fail on other arches when building in parallel.
-%ifarch %{ix86} x86_64 ppc ppc64
-[ -z "$RPM_BUILD_NCPUS" ] && \
-     RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"
-[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2
-[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4
-[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8
-%endif
-
-
-# ===== Thunderbird build =====
-# http://enigmail.mozdev.org/download/source.php.html
-make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS"
-
-# ===== Enigmail work =====
-pushd mailnews/extensions/enigmail
-./makemake -r
-popd
-
-pushd objdir/mailnews/extensions/enigmail
+# Fix version in XPI file name
+sed -e '/XPI_MODULE_VERS/s/1.6/%{version}/' -i Makefile
 make
 make xpi
-popd
 
-#===============================================================================
 
 %install
-cd %{tarballdir}
-
 mkdir -p $RPM_BUILD_ROOT%{enigmail_extname}
-unzip -q objdir/mozilla/dist/bin/enigmail-*-linux-*.xpi -d $RPM_BUILD_ROOT%{enigmail_extname}
+unzip -q build/enigmail-%{version}-linux-*.xpi -d $RPM_BUILD_ROOT%{enigmail_extname}
+
+# Needed for debuginfo
+find $RPM_BUILD_ROOT%{enigmail_extname} \
+  -name \*.so \
+  -exec chmod +x {} \; \
+  -print
 
 
 %files
@@ -306,6 +85,10 @@ unzip -q objdir/mozilla/dist/bin/enigmail-*-linux-*.xpi -d $RPM_BUILD_ROOT%{enig
 #===============================================================================
 
 %changelog
+* Tue Jul 15 2014 Remi Collet <remi at fedoraproject.org> 1.7-1
+- Enigmail 1.7
+- new build system, without need for Thunderbird sources
+
 * Sun Nov 03 2013 Dennis Gilmore <dennis at ausil.us> 1.6-2
 - remove ExcludeArch armv7hl
 


More information about the scm-commits mailing list