%define nspr_version 4.8.8 %define nss_version 3.12.10 %define cairo_version 1.10.0 %define freetype_version 2.1.9 %define lcms_version 1.19 %define sqlite_version 3.6.22 %define libnotify_version 0.4 %define build_langpacks 1 %define thunderbird_app_id \{3550f703-e582-4d05-9a08-453d09bdfdc6\} %global thunver 7.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 . %define tarballdir comm-release %define official_branding 1 %define mozappdir %{_libdir}/thunderbird %global enigmail_extname %{_libdir}/mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}/{847b3a00-7ab1-11d4-8f02-006008948af5} Summary: Authentication and encryption extension for Mozilla Thunderbird Name: thunderbird-enigmail Version: 1.3.2 %if 0%{?prever:1} Release: 0.1.%{prever}%{?dist} %else Release: 1%{?dist} %endif URL: http://enigmail.mozdev.org/ License: MPLv1.1 or GPLv2+ Group: Applications/Internet Source0: thunderbird-%{thunver}%{?thunbeta}.source.tar.bz2 #NoSource: 0 Source10: thunderbird-mozconfig Source11: thunderbird-mozconfig-branded # ===== Enigmail files ===== %if 0%{?CVS} # cvs -d :pserver:guest@mozdev.org:/cvs login # => password is guest # cvs -d :pserver:guest@mozdev.org:/cvs co enigmail/src # tar czf /home/rpmbuild/SOURCES/enigmail-20091121.tgz --exclude CVS -C enigmail/src . Source100: enigmail-%{CVS}.tgz %else 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 Patch7: crashreporter-remove-static.patch Patch8: xulrunner-6.0-secondary-ipc.patch # Enigmail patch %if %{official_branding} # Required by Mozilla Corporation %else # Not yet approved by Mozillla Corporation %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if 0%{?fedora} >= 14 BuildRequires: nspr-devel >= %{nspr_version} BuildRequires: nss-devel >= %{nss_version} %endif %if %{fedora} >= 15 # Library requirements (cairo-tee >= 1.10) BuildRequires: cairo-devel >= %{cairo_version} %endif BuildRequires: libnotify-devel >= %{libnotify_version} BuildRequires: libpng-devel BuildRequires: libjpeg-devel BuildRequires: zip BuildRequires: bzip2-devel BuildRequires: zlib-devel, gzip, zip, unzip BuildRequires: libIDL-devel BuildRequires: gtk2-devel BuildRequires: gnome-vfs2-devel BuildRequires: libgnome-devel BuildRequires: libgnomeui-devel BuildRequires: krb5-devel BuildRequires: pango-devel BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: libXt-devel BuildRequires: libXrender-devel BuildRequires: hunspell-devel %if 0%{?fedora} >= 15 # Need SQLITE_SECURE_DELETE option BuildRequires: sqlite-devel >= %{sqlite_version} %endif BuildRequires: startup-notification-devel BuildRequires: alsa-lib-devel BuildRequires: autoconf213 BuildRequires: desktop-file-utils BuildRequires: libcurl-devel BuildRequires: yasm BuildRequires: mesa-libGL-devel BuildRequires: GConf2-devel BuildRequires: lcms-devel >= %{lcms_version} %ifarch %{ix86} x86_64 BuildRequires: wireless-tools-devel %endif ## For fixing lang BuildRequires: dos2unix, php-cli # 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, thunderbird >= %{thunver} # Nothing usefull provided AutoProv: 0 %description 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 -p2 -b .dir # Mozilla (XULRunner) patches cd mozilla %patch7 -p2 -b .static %patch8 -p2 -b .secondary-ipc cd .. %if %{official_branding} # Required by Mozilla Corporation %else # Not yet approved by Mozilla Corporation %endif %{__rm} -f .mozconfig cat %{SOURCE10} \ %if %{fedora} < 15 | grep -v system-sqlite \ %endif %if %{fedora} < 14 | grep -v system-nss \ | grep -v system-nspr \ %endif %if %{fedora} < 15 | grep -v enable-system-cairo \ %endif %ifarch %{ix86} x86_64 | grep -v disable-necko-wifi \ %endif | tee .mozconfig cat <= 15 ac_add_options --enable-system-sqlite %endif %if %{fedora} < 14 ac_add_options --disable-libjpeg-turbo %endif EOF %if %{official_branding} %{__cat} %{SOURCE11} >> .mozconfig %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 # Apply Enigmail patch here popd %endif # ===== Fixing langpack 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 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//' -e 's/-fexceptions/-fno-exceptions/g') export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS export PREFIX='%{_prefix}' export LIBDIR='%{_libdir}' %define moz_make_flags -j1 %ifarch ppc ppc64 s390 s390x %define moz_make_flags -j1 %else %define moz_make_flags %{?_smp_mflags} %endif export LDFLAGS="-Wl,-rpath,%{mozappdir}" export MAKE="gmake %{moz_make_flags}" # ===== Thunderbird build ===== # http://enigmail.mozdev.org/download/source.php.html make -f client.mk build # ===== Enigmail work ===== pushd mailnews/extensions/enigmail ./makemake -r make make xpi popd #=============================================================================== %install cd %{tarballdir} %{__rm} -rf $RPM_BUILD_ROOT %{__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 %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{enigmail_extname} #=============================================================================== %changelog * Thu Sep 29 2011 Remi Collet 1.3.2-1 - Enigmail 1.3.2 for Thunderbird 7.0 * Wed Aug 17 2011 Remi Collet 1.3-1 - Enigmail 1.3 for Thunderbird 6.0 * Sat Jul 30 2011 Remi Collet 1.2.1-1 - Enigmail 1.2.1 for Thunderbird 5.0 * Tue Jul 19 2011 Remi Collet 1.2-1.2 - add --enable-chrome-format=jar to generate enigmail.jar * Sun Jul 17 2011 Remi Collet 1.2-1.1 - fix BR (dos2unix + php-cli) * Sun Jul 17 2011 Remi Collet 1.2-1 - Enigmail 1.2 for Thunderbird 5.0 * Thu Jul 22 2010 Remi Collet 1.1.2-3 - move to /usr/lib/mozilla/extensions (as lightning) - build against thunderbird 3.1.1 sources - sync patches with F-13 * Sat Jul 10 2010 Remi Collet 1.1.2-2 - remove link mecanism as thundebird dir is now stable (see #608511) * Wed Jun 30 2010 Remi Collet 1.1.2-1 - Enigmail 1.1.1 (against thunderbird 3.1) * Sat Jun 26 2010 Remi Collet 1.1.1-2 - new sources (only fix displayed version) * Sat Jun 26 2010 Remi Collet 1.1.1-1 - Enigmail 1.1.1 (against thunderbird 3.1) * Mon May 31 2010 Remi Collet 1.1-1 - Enigmail 1.1 (against thunderbird 3.1rc1) * Mon Feb 01 2010 Remi Collet 1.0.1-1 - Enigmail 1.0.1 (against thunderbird 3.0.1) * Fri Jan 29 2010 Remi Collet 1.0.1-0.1.rc1 - Enigmail 1.0.1rc1 (against thunderbird 3.0.1) * Mon Nov 30 2009 Remi Collet 1.0.0-1 - Enigmail 1.0 (against thunderbird 3.0rc1) * Sat Nov 21 2009 Remi Collet 1.0-0.1.cvs20091121 - new CVS snapshot (against thunderbird 3.0rc1) * Tue Jul 21 2009 Remi Collet 0.97a-0.1.cvs20090721 - new CVS snapshot (against thunderbird 3.0b3) * Thu May 21 2009 Remi Collet 0.96a-0.3.cvs20090521 - new CVS snapshot - fix License and Sumnary * Mon May 18 2009 Remi Collet 0.96a-0.2.cvs20090516 - use mozilla-extension-update.sh from thunderbird-lightning * Sat May 16 2009 Remi Collet 0.96a-0.1.cvs20090516 - new CVS snapshot - rpmfusion review proposal * Thu Apr 30 2009 Remi Collet 0.96a-0.1.cvs20090430.fc11.remi - new CVS snapshot - F11 build * Mon Mar 16 2009 Remi Collet 0.96a-0.1.cvs20090316.fc#.remi - new CVS snapshot - add enigmail-fixlang.php * Sun Mar 15 2009 Remi Collet 0.96a-0.1.cvs20090315.fc#.remi - enigmail 0.96a (CVS), Thunderbird 3.0b2