%define __libtoolize /bin/true %define __cputoolize /bin/true %define extname thunderbird %define name mozilla-%{extname} %define version 0.5 %define release 12mdk %define build_name mozilla %define moz_name mozilla-1.6 %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.83.latest %define ipc_version 1.0.5 %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/projects/%{extname}/ Source0: thunderbird-%{version}-cvs.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/projects/thunderbird/release-notes.html Patch0: mozilla-thunderbird-logname.patch.bz2 BuildRoot: %{_tmppath}/%{name}-root BuildRequires: libpng-devel BuildRequires: libmng-devel BuildRequires: libgtk+2.0_0 >= 0:1.3.7 BuildRequires: zip >= 0:2.3 BuildRequires: libIDL2-devel >= 0:0.8.0 BuildRequires: libXft2-devel BuildRequires: csh PreReq: perl >= 0:5.6.0 Requires: glibc >= 0:2.3.2 Requires: gtk+2 >= 0:2.2.0 freetype2 Requires: gnupg %define _provides_exceptions libnspr4.so\\|libplc4.so\\|libplds4.so\\|libnss\\|libsmime3\\|libsoftokn\\|libssl3\\|libgtkembedmoz.so\\|libxpcom.so %define _requires_exceptions libnspr4.so\\|libplc4.so\\|libplds4.so\\|libnss\\|libsmime3\\|libsoftokn\\|libssl3\\|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}-%{release} Conflicts: mozilla-devel Conflicts: libnss3-devel Conflicts: libnspr4-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}-%{release} Requires: %{name}-enigmime = %{epoch}:%{version}-%{release} 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}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release} %description enigmime Inter-process communication required for enigmail. %prep %setup -q -n %{build_name} %__install -m 644 %{SOURCE4} . %setup -T -D -n %{build_name}/extensions -q -a1 %setup -T -D -n %{build_name}/extensions -q -a2 %setup -T -D -n %{build_name} %setup -T -D -n %{build_name} -q -a3 %patch0 -p1 %__perl -p -i -e 's|%MOZAPPDIR%|%{mozillalibdir}|' mail/app/mozilla.in # fix paths in config/autoconf.mk.in %__perl -pi -e "s|mozilla-\\$\(MOZILLA_VERSION\)|%lib_name|" config/autoconf.mk.in %build export MOZ_BUILD_DATE="$(date -u +%Y%m%d%H)" 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 \ --without-system-nspr \ --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 \ --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 # let jars get compressed %__perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl %make cd extensions/ipc SECURE_LEVEL= ./makemake BUILD_OFFICIAL=1 MOZILLA_OFFICIAL=1 %make cd ../enigmail SECURE_LEVEL= ./makemake -r 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 $RPM_BUILD_ROOT %makeinstall_std # Menu mkdir -p $RPM_BUILD_ROOT%{_menudir} %__cat > $RPM_BUILD_ROOT%{_menudir}/%{name} << EOF ?package(%{name}): \ command="soundwrapper %{_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 $RPM_BUILD_ROOT/%{_liconsdir}/%{name}.png %__install -D -m 644 %{name}-32.png $RPM_BUILD_ROOT/%{_iconsdir}/%{name}.png %__install -D -m 644 %{name}-16.png $RPM_BUILD_ROOT/%{_miconsdir}/%{name}.png # move Thunderbird stuff %__mv %buildroot%_bindir/%extname %buildroot%_bindir/%exec_name # rename mozilla-config %__mv %buildroot%_bindir/mozilla-config %buildroot%_bindir/%exec_name-config # rename pkg-config files pushd %buildroot%_libdir/pkgconfig for i in *.pc; do %__perl -p -i -e 's|mozilla-nspr|%{name}-nspr|' $i %__perl -p -i -e 's|mozilla-xpcom|%{name}-xpcom|' $i %__mv $i `echo $i | sed 's|^mozilla|%{name}|'` done popd pushd $RPM_BUILD_ROOT 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 -i -e 's|LIBDIR/mozilla-MOZILLA_VERSION|%{mozillalibdir}|g' build/package/rpm/SOURCES/mozilla-rebuild-databases.pl.in %__install -m 755 build/package/rpm/SOURCES/mozilla-rebuild-databases.pl.in $RPM_BUILD_ROOT%{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 \ chrome/enigmail-skin.jar components/enigprefs-service.js \ ; do %__install dist/bin/$i $RPM_BUILD_ROOT/%{mozillalibdir}/$i; done %__rm -f ${RPM_BUILD_DIR}/%{build_name}/mozilla-enigmail.list build/package/rpm/SOURCES/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 $RPM_BUILD_ROOT%{mozillalibdir} \ --install-root %{mozillalibdir} %__rm -f ${RPM_BUILD_DIR}/%{build_name}/mozilla-enigmime.list build/package/rpm/SOURCES/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 $RPM_BUILD_ROOT%{mozillalibdir} \ --install-root %{mozillalibdir} %clean %__rm -rf $RPM_BUILD_ROOT %post %update_menus %{mozillalibdir}/mozilla-rebuild-databases.pl %post devel update-alternatives --install %{_bindir}/mozilla-config mozilla-config %{_bindir}/%{exec_name}-config 10 \ --slave %_libdir/pkgconfig/mozilla-gtkmozembed.pc mozilla-gtkmozembed.pc %_libdir/pkgconfig/%{name}-gtkmozembed.pc \ --slave %_libdir/pkgconfig/mozilla-js.pc mozilla-js.pc %_libdir/pkgconfig/%{name}-js.pc \ --slave %_libdir/pkgconfig/mozilla-nspr.pc mozilla-nspr.pc %_libdir/pkgconfig/%{name}-nspr.pc \ --slave %_libdir/pkgconfig/mozilla-nss.pc mozilla-nss.pc %_libdir/pkgconfig/%{name}-nss.pc \ --slave %_libdir/pkgconfig/mozilla-plugin.pc mozilla-plugin.pc %_libdir/pkgconfig/%{name}-plugin.pc \ --slave %_libdir/pkgconfig/mozilla-xpcom.pc mozilla-xpcom.pc %_libdir/pkgconfig/%{name}-xpcom.pc %postun %clean_menus %postun devel if [ "$1" = "0" ]; then update-alternatives --remove mozilla-config %{_bindir}/%{exec_name}-config fi %post enigmail %__perl -pi -e 's/.*enigmail.*\n//' %{mozillalibdir}/chrome/installed-chrome.txt %__cat << EOF >> %{mozillalibdir}/chrome/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 %postun enigmail %__perl -pi -e 's/.*enigmail.*\n//' %{mozillalibdir}/chrome/installed-chrome.txt %{mozillalibdir}/mozilla-rebuild-databases.pl %post enigmime %{mozillalibdir}/mozilla-rebuild-databases.pl %postun enigmime %{mozillalibdir}/mozilla-rebuild-databases.pl %files -f mozilla-libdir.list %defattr(-,root,root) %doc README.txt LEGAL LICENSE %{_bindir}/%{exec_name} %{mozillalibdir}/mozilla-rebuild-databases.pl %{_menudir}/* %{_miconsdir}/*.png %{_iconsdir}/*.png %{_liconsdir}/*.png %files devel %defattr(-,root,root) %{_bindir}/%{exec_name}-config %{_includedir}/* %{_datadir}/aclocal/* %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.jar %{mozillalibdir}/chrome/enigmail-skin.jar %{mozillalibdir}/components/enigmail.js %{mozillalibdir}/components/enigprefs-service.js %{mozillalibdir}/components/enigmail.xpt %files enigmime -f mozilla-enigmime.list %defattr(-,root,root) %dir %{mozillalibdir}/components %{mozillalibdir}/components/enigmime.xpt %{mozillalibdir}/components/ipc.xpt %{mozillalibdir}/components/libenigmime.so %changelog * 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