%if %mdkversion > 1000 %define __libtoolize /bin/true %endif %define __cputoolize /bin/true %define extname thunderbird %define name mozilla-%{extname} %define version 1.0.2 %define rel 2 #warning: always end release date with 00 # (it should be the hour of build but it is not significant for rpm) %define date 2005032200 %{?!mkrel:%define mkrel(c:) %{-c:0.%{-c*}.}%{!?_with_unstable:%(perl -e '$_="%{1}";m/(.\*)(\\d+)$/;$rel=${2}-1;re;print "$1$rel";').%{?subrel:%subrel}%{!?subrel:1}.%{?distversion:%distversion}%{?!distversion:%(echo $[%{mdkversion}/10])}}%{?_with_unstable:%{1}}%{?distsuffix:%distsuffix}%{?!distsuffix:mdk}} %define release %mkrel %{rel} %{?!_with_unstable: %{error:%(echo -e "\n\n\nYou are building a package tagged for a stable release, please see \nhttp://qa.mandrakesoft.com/twiki/bin/view/Main/DistroSpecificReleaseTag\nif you are building for cooker\n\n\n ")}%(sleep 4)} %define build_name mozilla-%{extname}-%{version}/mozilla %define exec_name mozilla-%{extname} %define up_ca_name MozillaThunderbird %define lib_name %{exec_name}-%{version} %define mozillalibdir %{_libdir}/%{lib_name} # used for enigmail and protozilla sources: %define enigmail_version 0.90.0 %define ipc_version 1.1.2 %define section Internet/Mail %define title Mozilla Thunderbird %define summary Mozilla Thunderbird mail/newsgroup client Summary: %{summary} Name: %{name} Version: %{version} Release: %{release} Epoch: 0 License: MPL/GPL/LGPL Group: Networking/Mail URL: http://www.mozilla.org/products/thunderbird/ Source0: http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}-source.tar.bz2 Source1: http://downloads.mozdev.org/enigmail/src/ipc-%{ipc_version}.tar.bz2 Source2: http://downloads.mozdev.org/enigmail/src/enigmail-%{enigmail_version}.tar.bz2 Source3: %{name}-icons.tar.bz2 Source4: http://www.mozilla.org/products/thunderbird/releases/index.html Source5: mozilla-thunderbird-rebuild-databases.pl.in Source6: mozilla-make-package.pl.bz2 Source7: http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}-source.tar.bz2.asc Patch0: mozilla-thunderbird-0.8-progname.patch.bz2 Patch1: mozilla-1.7-enigmail-package.patch.bz2 Patch2: mozilla-thunderbird-check-default-mailer.patch.bz2 Patch3: mozilla-thunderbird-locale.patch.bz2 Patch4: mozilla-thunderbird-myspell.patch.bz2 # (fc) 1.0-9mdk fix compilation with system nspr Patch5: mozilla-thunderbird-1.0-systemnspr.patch.bz2 # (fc) 1.0-9mdk quiet extension manager (from firefox package) Patch6: mozilla-thunderbird-1.0-quietextensions.patch.bz2 # (fc) 1.0-9mdk fix extension manager (from firefox package) Patch7: mozilla-thunderbird-1.0-fixextensionmanager.patch.bz2 # (fc) 1.0.2-2mdk fix JS vulnerability (CVS) (Moz bug #288688) Patch8: mozilla-thunderbird-1.0.2-jsvulnerability.patch.bz2 # (fc) 1.0.2-2mdk add env variable to disable GNOME uri handler (Fedora) Patch9: mozilla-thunderbird-1.0.2-gnome-uriloader.patch.bz2 PreReq: perl >= 0:5.6.0 Requires: freetype2 Requires: glibc >= 0:2.3.2 Requires: gtk+2 >= 0:2.2.0 Requires: myspell-dictionary BuildRequires: libpng-devel BuildRequires: libmng-devel BuildRequires: gtk+2-devel >= 0:1.3.7 BuildRequires: zip >= 0:2.3 BuildRequires: libIDL2-devel >= 0:0.8.0 BuildRequires: libXft2-devel BuildRequires: csh BuildRequires: nss-devel %if %mdkversion > 1000 BuildRequires: autoconf2.1 %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %define _provides_exceptions libgtkembedmoz.so\\|libxpcom.so %define _requires_exceptions libgtkembedmoz.so\\|libxpcom.so %description Mozilla Thunderbird is a redesign of the Mozilla mail component, written using the XUL user interface language and designed to be cross-platform. %package devel Summary: %{up_ca_name} development files Group: Development/Other Requires: %{name} = %{epoch}:%{version} Conflicts: mozilla-devel Conflicts: libjs1-devel %description devel %{up_ca_name} development files. %package enigmail Summary: GPG support for %{up_ca_name} Group: Networking/Mail Requires: %{name} = %{epoch}:%{version} Requires: %{name}-enigmime = %{epoch}:%{version} Requires: gnupg %description enigmail GPG support for %{up_ca_name}. %package enigmime Summary: Inter-process communication required for enigmail Group: Networking/Mail Prereq: %{name} = %{epoch}:%{version} Requires: %{name} = %{epoch}:%{version} %description enigmime Inter-process communication required for enigmail. %prep %setup -q -c %{name}-%{version} %setup -T -D -n %{build_name} %patch0 -p1 -b .progname %patch1 -p1 -b .enigmailpackage %patch2 -p1 -b .check %patch3 -p1 -b .locale %patch4 -p1 -b .myspell %patch5 -p1 -b .systemnspr %patch6 -p1 -b .quietextensionmanager %patch7 -p1 -b .fixextensionmanager %patch8 -p1 -b .jsvulnerability %patch9 -p1 -b .gnome-uriloader %__install -m 644 %{SOURCE4} release-notes.html %setup -T -D -n %{build_name}/extensions -q -a1 %setup -T -D -n %{build_name}/extensions -q -a2 %setup -T -D -n %{build_name} -q -a3 %__perl -p -i -e 's|MOZ_APP_NAME=%{extname}|MOZ_APP_NAME=%{exec_name}|' configure.in autoconf %build export TOPDIR=`pwd` export MOZ_BUILD_DATE=%{date} export MOZ_THUNDERBIRD=1 %configure \ --with-system-jpeg \ --with-system-zlib \ --with-system-png \ --with-system-mng \ --disable-calendar \ --enable-xft \ --disable-pedantic \ --disable-svg \ --enable-mathml \ --with-system-nspr \ --with-system-nss \ --enable-nspr-autoconf \ --enable-xsl \ --enable-crypto \ --enable-xinerama \ --with-pthreads \ --with-default-mozilla-five-home=%{mozillalibdir} \ --with-user-appdir=.thunderbird \ --disable-jsd \ --disable-accessibility \ --disable-profilesharing \ --disable-necko-disk-cache \ --disable-activex-scripting \ --disable-installer \ --disable-activex \ --disable-tests \ --disable-debug \ --disable-dtd-debug \ --disable-logging \ --enable-reorder \ --enable-strip \ --enable-strip-libs \ --enable-xterm-updates \ --disable-toolkit-qt \ --disable-toolkit-xlib \ --enable-extensions=wallet,spellcheck,xmlextras,webservices \ --enable-necko-protocols=http,file,jar,viewsource,res,data \ --enable-image-decoders=png,gif,jpeg,bmp \ --enable-toolkit-gtk2 \ --enable-default-toolkit=gtk2 \ --disable-toolkit-gtk \ --enable-ipv6 \ --disable-freetype2 \ --enable-single-profile # let jars get compressed %__perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl %make cd extensions/ipc #SECURE_LEVEL= ./makemake %__perl -p -e "s,\@srcdir\@,./,g;s,\@top_srcdir\@,$TOPDIR,g" Makefile.in > Makefile BUILD_OFFICIAL=1 MOZILLA_OFFICIAL=1 %make cd ../enigmail #SECURE_LEVEL= ./makemake -r for i in `find . -type d`; do pushd $i >/dev/null %__perl -p -e "s,\@srcdir\@,./,;s,\@top_srcdir\@,$TOPDIR,g" Makefile.in > Makefile popd >/dev/null done BUILD_OFFICIAL=1 MOZILLA_OFFICIAL=1 %make (cd lang %__perl -p -i -e 's|es-AR/enigmail.properties|es-ES/enigmail.properties|' jar.mn BUILD_OFFICIAL=1 MOZILLA_OFFICIAL=1 %make ) cd ../.. %install %__rm -rf %{buildroot} %makeinstall_std destdir=%{buildroot} %__mv %{buildroot}%{_bindir}/defaults/profile/prefs.js %{buildroot}%{_libdir}/%{lib_name}/defaults/profile/ %__install -D dist/bin/defaults/isp/rss.rdf \ %{buildroot}%{_libdir}/%{lib_name}/defaults/isp/rss.rdf %__install -D dist/bin/defaults/isp/movemail.rdf \ %{buildroot}%{_libdir}/%{lib_name}/defaults/isp/movemail.rdf %__install -D dist/bin/defaults/isp/US/rss.rdf \ %{buildroot}%{_libdir}/%{lib_name}/defaults/isp/US/rss.rdf %__install -D dist/bin/defaults/isp/US/movemail.rdf \ %{buildroot}%{_libdir}/%{lib_name}/defaults/isp/US/movemail.rdf # New file installed-chrome.txt fot multi-language support %__mkdir_p %{buildroot}%{mozillalibdir}/chrome/lang %__cp %{buildroot}%{mozillalibdir}/chrome/installed-chrome.txt %{buildroot}%{mozillalibdir}/chrome/lang/installed-chrome.txt # New file installed-chrome.txt fot multi-language support %__mkdir_p %{buildroot}%{mozillalibdir}/chrome/lang %__cp %{buildroot}%{mozillalibdir}/chrome/installed-chrome.txt %{buildroot}%{mozillalibdir}/chrome/lang/installed-chrome.txt # Menu %__mkdir_p %{buildroot}%{_menudir} %__cat > %{buildroot}%{_menudir}/%{name} << EOF ?package(%{name}): \ command="%{_bindir}/%{exec_name}" \ needs="X11" \ icon="%{name}.png" \ section="%{section}" \ title="%{title}" \ longtitle="Mozilla Thunderbird is a redesign of Mozilla's Mail/News Client" EOF # icons %__install -D -m 644 %{name}-48.png %{buildroot}/%{_liconsdir}/%{name}.png %__install -D -m 644 %{name}-32.png %{buildroot}/%{_iconsdir}/%{name}.png %__install -D -m 644 %{name}-16.png %{buildroot}/%{_miconsdir}/%{name}.png # move Thunderbird stuff %__mv %{buildroot}%{_bindir}/%extname %{buildroot}%{_bindir}/%{exec_name} # remove unpackaged files rm -f $RPM_BUILD_ROOT%{mozillalibdir}/{libnspr4.so,libplc4.so,libplds4.so,libnss3.so,libnssckbi.so,libsmime3.so,libsoftokn3.so,libssl3.so,libsoftokn3.chk,TestGtkEmbed} pushd %{buildroot} find .%{mozillalibdir} -type d | sed 's|^.|\%dir |' > ${RPM_BUILD_DIR}/%{build_name}/mozilla-libdir.list find .%{mozillalibdir} -type f | sed 's|^.||' >> ${RPM_BUILD_DIR}/%{build_name}/mozilla-libdir.list popd # install our rebuild file %__perl -p -e 's|LIBDIR/mozilla-MOZILLA_VERSION|%{mozillalibdir}|g' %{SOURCE5} > mozilla-rebuild-databases.pl.in %__install -m 755 mozilla-rebuild-databases.pl.in %{buildroot}%{mozillalibdir}/mozilla-rebuild-databases.pl # enigmail for i in components/enigmime.xpt components/ipc.xpt components/libenigmime.so \ components/enigmail.js components/enigmail.xpt chrome/enigmail.jar \ components/enigprefs-service.js chrome/enigmail-skin.jar \ chrome/enigmime.jar defaults/pref/enigmail.js chrome/enigmail-en-US.jar ; do %__install dist/bin/$i %{buildroot}/%{mozillalibdir}/$i; done %__chmod 644 %{buildroot}/%{mozillalibdir}/defaults/pref/enigmail.js %__perl -pi -e 's|agentPath",""|agentPath","/usr/bin/gpg"|' %{buildroot}/%{mozillalibdir}/defaults/pref/enigmail.js %__rm -f ${RPM_BUILD_DIR}/%{build_name}/mozilla-enigmail.list %__bzip2 -cd %{SOURCE6} > mozilla-make-package.pl %__chmod 755 mozilla-make-package.pl ./mozilla-make-package.pl --package enigmail \ --output-file ${RPM_BUILD_DIR}/%{build_name}/mozilla-enigmail.list \ --package-file ${RPM_BUILD_DIR}/%{build_name}/xpinstall/packager/packages-unix \ --install-dir %{buildroot}%{mozillalibdir} \ --install-root %{mozillalibdir} %__rm -f ${RPM_BUILD_DIR}/%{build_name}/mozilla-enigmime.list ./mozilla-make-package.pl --package enigmime \ --output-file ${RPM_BUILD_DIR}/%{build_name}/mozilla-enigmime.list \ --package-file ${RPM_BUILD_DIR}/%{build_name}/xpinstall/packager/packages-unix \ --install-dir %{buildroot}%{mozillalibdir} \ --install-root %{mozillalibdir} %if %mdkversion >= 1020 %multiarch_binaries %{buildroot}%{_bindir}/%{exec_name}-config %multiarch_includes %{buildroot}%{_includedir}/%{lib_name}/mozilla-config.h %multiarch_includes %{buildroot}%{_includedir}/%{lib_name}/js/jsautocfg.h %endif %clean %__rm -rf %{buildroot} %post %update_menus %{mozillalibdir}/mozilla-rebuild-databases.pl export HOME="/root" %{name} -register %preun # is a final removal? if [ "$1" == "0" ]; then %__rm -rf %{mozillalibdir}/chrome/overlayinfo %__rm -rf %{mozillalibdir}/components %__rm -f %{mozillalibdir}/chrome/*.rdf %__rm -rf %{mozillalibdir}/extensions fi %post devel if [ "$1" = "2" ]; then update-alternatives --remove mozilla-config %_bindir/%exec_name-config fi %postun %clean_menus if [ $1 -gt 1 ]; then %{mozillalibdir}/mozilla-rebuild-databases.pl fi %post enigmail %__perl -pi -e 's/.*enigmail.*\n//' %{mozillalibdir}/chrome/lang/installed-chrome.txt %__cat << EOF >> %{mozillalibdir}/chrome/lang/installed-chrome.txt content,install,url,jar:resource:/chrome/enigmail.jar!/content/enigmail/ skin,install,url,jar:resource:/chrome/enigmail-skin.jar!/skin/modern/enigmail/ skin,install,url,jar:resource:/chrome/enigmail-skin.jar!/skin/classic/enigmail/ locale,install,url,jar:resource:/chrome/enigmail.jar!/locale/en-US/enigmail/ EOF %{mozillalibdir}/mozilla-rebuild-databases.pl %preun enigmail if [ $1 -eq 0 ]; then %__perl -p -i -e 's/.*enigmail.*\n//' %{mozillalibdir}/chrome/lang/installed-chrome.txt %{mozillalibdir}/mozilla-rebuild-databases.pl fi %post enigmime %{mozillalibdir}/mozilla-rebuild-databases.pl %preun enigmime if [ $1 -eq 0 ]; then %{mozillalibdir}/mozilla-rebuild-databases.pl fi %files -f mozilla-libdir.list %defattr(-,root,root) %doc README.txt LEGAL LICENSE release-notes.html %{_bindir}/%{exec_name} %{mozillalibdir}/mozilla-rebuild-databases.pl %{_menudir}/* %{_miconsdir}/*.png %{_iconsdir}/*.png %{_liconsdir}/*.png %files devel %defattr(-,root,root) %{_bindir}/%{exec_name}-config %if %mdkversion >= 1020 %multiarch %{multiarch_bindir}/%{exec_name}-config %multiarch %{multiarch_includedir}/%{lib_name}/mozilla-config.h %multiarch %{multiarch_includedir}/%{lib_name}/js/jsautocfg.h %endif %{_includedir}/%{lib_name} %dir %{_datadir}/idl/%{lib_name} %{_datadir}/idl/%{lib_name}/* %{_libdir}/pkgconfig/* %files enigmail -f mozilla-enigmail.list %defattr(-,root,root) %dir %{mozillalibdir}/chrome %dir %{mozillalibdir}/components %{mozillalibdir}/chrome/enigmail-en-US.jar %files enigmime -f mozilla-enigmime.list %defattr(-,root,root) %dir %{mozillalibdir}/components %changelog * Tue Apr 05 2005 Frederic Crozat <fcrozat@mandrakesoft.com> 1.0.2-2mdk - Patch8 (CVS): fix JS vulnerability (Moz bug #288688) - Patch9 (Fedora) : add env variable to disable GNOME url handler - Update source5 to set HOME is not set * Tue Mar 22 2005 Frederic Crozat <fcrozat@mandrakesoft.com> 1.0.2-1mdk - Release 1.0.2 (security fix) * Wed Mar 16 2005 Frederic Crozat <fcrozat@mandrakesoft.com> 1.0-9mdk - Patch5: fix compilation with system nspr - Patch6: quiet extension manager (Firefox package) - Patch7: fix extension manager (Firefox package) - Change build directory to allow parallel build with other moz products - build against libnspr4/libnss3 from firefox - Remove alternative on mozilla-config * Mon Mar 14 2005 David Walluck <walluck@mandrake.org> 0:1.0-8mdk - lang patch from Yuri Bugelli <yuri.bugelli@virgilio.it> * Tue Feb 15 2005 Couriousous <couriousous@mandrake.org> 0:1.0-7mdk - Fix dictionary detection ( don't take hyph ) * Mon Feb 14 2005 David Walluck <walluck@mandrake.org> 0:1.0-6mdk - enigmail 0.90.0 - %%multiarch - "fix" requires-on-release - Requires: myspell-dictionary - %%mkrel (thanks Buchan Milne) - add patch for locale detection (thanks Couriousous) - add patch for mozilla dictionary (thanks Couriousous) - add patch for automatic locale detection (thanks Couriousous) * Thu Dec 16 2004 Götz Waschk <waschk@linux-mandrake.com> 1.0-5mdk - fix bug 12686, thanks to mightor * Tue Dec 14 2004 Götz Waschk <waschk@linux-mandrake.com> 1.0-4mdk - don't try to register as default mail client on startup * Thu Dec 9 2004 Götz Waschk <waschk@linux-mandrake.com> 1.0-3mdk - add missing file - fix enigmail installation * Tue Dec 07 2004 Buchan Milne <bgmilne@linux-mandrake.com> 1.0-2mdk - fix build on 10.1 - distro-specific release tag * Tue Dec 7 2004 Götz Waschk <waschk@linux-mandrake.com> 1.0-1mdk - update enigmail - new version * Thu Dec 2 2004 Götz Waschk <waschk@linux-mandrake.com> 1.0-0.rc.2mdk - fix post script * Thu Dec 2 2004 Götz Waschk <waschk@linux-mandrake.com> 1.0-0.rc.1mdk - upgrade enigmail - remove soundwrapper - fix post script (from firefox package) - new version * Fri Nov 5 2004 Götz Waschk <waschk@linux-mandrake.com> 0.9-1mdk - update ipc - add gpg signature - fix source URL - New release 0.9 * Thu Sep 23 2004 Götz Waschk <waschk@linux-mandrake.com> 0.8-4mdk - drop xvfb hack, call thunderbird-bin -register instead - upgrade enigmail to 0.86.1 * Wed Sep 15 2004 Götz Waschk <waschk@linux-mandrake.com> 0.8-3mdk - update release notes - update enimail * Tue Sep 14 2004 Götz Waschk <waschk@linux-mandrake.com> 0.8-2mdk - fix URL - fix binary name * Tue Sep 14 2004 Götz Waschk <waschk@linux-mandrake.com> 0.8-1mdk - fix installation - fix URL - New release 0.8 * Fri Aug 06 2004 Buchan Milne <bgmilne@linux-mandrake.com> 0.7.3-2mdk - enigmail 0.85.0 - merge fixes from Club (Thu Jul 01 2004 0.7.1-0.100.1mdk) - enigmail 0.84.2, ipc 1.0.7 - fix scripts to not remove entries just added, and not use scripts we just uninstalled (preuninstead of postun). * Thu Aug 5 2004 Götz Waschk <waschk@linux-mandrake.com> 0.7.3-1mdk - increase sleep time in the postinstall script - New release 0.7.3 * Mon Jul 12 2004 Götz Waschk <waschk@linux-mandrake.com> 0.7.2-1mdk - use hacks from the fedora package to run mozilla-thunderbird as root first - New release 0.7.2 * Wed Jun 30 2004 Götz Waschk <waschk@linux-mandrake.com> 0.7.1-1mdk - compress source 6 - reenable libtoolize on Cooker - fix 10.0 build - New release 0.7.1 * Mon Jun 28 2004 Guillaume Rousse <guillomovitch@mandrake.org> 0.7-2mdk - dropped patch0, fixed upstream (Sebastian Dransfeld <sebastian.dransfeld@ntnu.no>) * Fri Jun 25 2004 Guillaume Rousse <guillomovitch@mandrake.org> 0.7-1mdk - new version - --enable-single-profile * Sat Jun 12 2004 Pascal Terjan <pterjan@mandrake.org> 0.6-2mdk - BuildRequires autoconf2.1 * Thu May 20 2004 Pascal Terjan <pterjan@mandrake.org> 0.6-1mdk - 0.6 - rediff patch0 - some cleaning, some more should be done * Sun Feb 29 2004 David Walluck <walluck@linux-mandrake.com> 0:0.5-12mdk - mozilla-rebuild-databases.pl should always be there, even for enigmail and enigmime packages - ditto for installed-chrome.txt * Sun Feb 29 2004 Guillaume Rousse <guillomovitch@mandrake.org> 0.5-11mdk - moved alternatives installation to devel package %%post - don't test for mozilla-rebuild-databases.pl presence, it is included * Wed Feb 25 2004 David Walluck <walluck@linux-mandrake.com> 0:0.5-10mdk - install mozilla-rebuild-databases.pl - enigmail chrome should only be installed in %%post and not in %%install - remove enigmail lang support as per mozilla-enigmail package - remove old enigmail chrome on enigmail package install/upgrade - always install enigmail chrome on enigmail package install/upgrade * Tue Feb 24 2004 David Walluck <walluck@linux-mandrake.com> 0:0.5-9mdk - don't own mozilla-config * Tue Feb 24 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 0:0.5-8mdk - fix file list * Mon Feb 23 2004 David Walluck <walluck@linux-mandrake.com> 0:0.5-7mdk - use %%configure - fix enigmail lang jar creation - remove %%{builddate} macro, but still set MOZ_BUILD_DATE - alternativize mozilla-config and pkgconfig files - don't enable cpp-rtti * Sun Feb 22 2004 David Walluck <walluck@linux-mandrake.com> 0:0.5-6mdk - fix permissions on patch * Sun Feb 22 2004 David Walluck <walluck@linux-mandrake.com> 0:0.5-5mdk - fix conflict with other mozilla's (Frederik Himpe) * Sun Feb 15 2004 David Walluck <walluck@linux-mandrake.com> 0:0.5-4mdk - use official CVS tagged release (dos2unix no longer needed) - no more debian patch (I'm not sure which version this applies to) - compress jars - split off enigmail and enigmime packages - add missing enigprefs-service.js to enigmail package - change menu group for mdk 10.0 - enable xinerama extension as in mozilla-firebird package - add %%{builddate} macro - add %%{build_name} macro as in mozilla-firebird package - add epochs - Mark Baas <m.baas@zarb.org> contributed heavily to this spec file, including updating for 0.5, contributing icons, and initial enigmail support * Sun Feb 15 2004 Buchan Milne <bgmilne@linux-mandrake.com> 0.5-3mdk - Ship original source and dos2unix it (instead of hacked-up source tarball) * Thu Feb 12 2004 Christophe Guilloux <cg-ml@rootix.info> 0.5-2mdk - based on 0.3-1mdk * Thu Oct 16 2003 Buchan Milne <bgmilne@linux-mandrake.com> 0.3-1mdk - First Mandrake package, based on mozilla-firebird-0.6.1-6mdk