Sisyphus repository
Last update: 3 march 2021 | SRPMs: 17840 | Visits: 20390728
en ru br
ALT Linux repos
3.0: 1.0.6-alt2.1

Group :: Networking/Mail
RPM: thunderbird

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

# -*- mode: RPM-SPEC; coding: utf-8 -*-

%def_without debug
%def_without xprint
%def_with branding
%def_with nspr
%def_with nss
%def_without libxul
%def_with mozldap

%if_with debug
%set_strip_method none
%endif # debug

Summary:        Mozilla Thunderbird is a redesign of the Mozilla mail component.
Summary(ru_RU.UTF-8): Mozilla Thunderbird - это реинкарнация почтовой компоненты Mozilla
Name:           %tbird_name
Version:        %tbird_version
Release:       %tbird_release
License:        MPL/GPL
Group:          Networking/Mail

Packager: Alexey Gladkov <legion at>

Source0: %name-source.tar
Source1: %name-icons.tar
Source2: %name.userContent.css
Source3: %name.desktop
Source5: .mozconfig-thunderbird
Source6: thunderbird-mailto
Source7: %name-build-scripts.tar

Patch3: thunderbird-1.5-embedding-linker-fix.patch
Patch4: thunderbind-alt-url-handler.patch
Patch5: thunderbird-alt-pref-fix.patch
Patch6: 01_locale.patch

Patch7: thunderbird-alt-extensions-dir.patch
Patch8: firefox-
Patch9: firefox-alt-install-paths-fix.patch
Patch10: firefox-alt-system-nspr-flags.patch


Patch11: thunderbird-gcc-4.1-fix.patch

Patch12: firefox-nopangoxft.patch
Patch14: thunderbird-alt-libs-fix.patch
Patch15: thunderbird-alt-with-system-mozldap.patch

Patch20: thunderbird-fix-375292.patch
Patch21: thunderbird-alt-ssl-manager-fix.patch

# Automatically added by buildreq on Fri Mar 24 2006

BuildRequires: doxygen gcc-c++ imake libfreetype-devel libgtk+2-devel libIDL-devel libjpeg-devel
BuildRequires: libnspr-devel libnss-devel-static libpng-devel libXinerama-devel libXp-devel
BuildRequires: libXt-devel libXft-devel makedepend nss-utils unzip xorg-cf-files zip
BuildRequires: chrpath browser-plugins-npapi-devel

BuildRequires(pre): rpm-build-thunderbird

%{?_with_nspr:BuildRequires: libnspr-devel}
%{?_with_nspr:Requires: libnspr}

%{?_with_nss:BuildRequires: libnss-devel libnss-devel-static}
%{?_with_nss:Requires: libnss}

%{?_with_mozldap:BuildRequires: mozldap-devel}
%{?_with_mozldap:Requires: mozldap}

%{?_with_xprint:Requires: xorg-x11-xprt}

Requires: gtk+2 >= 2.2.0 url_handler >= 0.2.1-alt2 freetype2 browser-plugins-npapi
Conflicts: thunderbird-enigmail < 0.84.2
Conflicts: thunderbird-ru < 0.7.2
Obsoletes: thunderbird-calendar

Provides: mailclient
Conflicts: thunderbird < 1.5

BuildRequires: autoconf_2.13
%set_autoconf_version 2.13

Mail/news client based on the Mozilla web browser.  The mail/news
client supports IMAP, POP, and NNTP and has an easy to use interface.

%description -l ru_RU.UTF-8
Почтовая/новостная программа на базе браузера Web Mozilla.
Программа поддерживает протоколы IMAP, POP, NNTP и имеет
легкий в использовании интерфейс.

%package devel
Requires: %name = %version-%release
Summary: Mozilla Thunderbird development files
Group: Development/Other

%description devel
Mozilla Thunderbird development files

%setup -q -n %name-%version -c
%setup -q -n %name-%version/mozilla -T -D -a1
%setup -q -n %name-%version/mozilla -T -D -a7

%patch3 -p1 -b .fix3
%patch4 -p1 -b .fix4
%patch5 -p1 -b .fix5
%patch6 -p1 -b .fix6
%patch7 -p1 -b .fix7
%patch8 -p1 -b .fix8
%patch9 -p1 -b .fix9
%patch10 -p1 -b .fix10
#patch12 -p1 -b .fix12
%patch14 -p1 -b .fix14
%patch15 -p1 -b .fix15
#patch20 -p1 -b .fix20
%patch21 -p1 -b .fix21

%add_optflags %optflags_shared
%add_findprov_lib_path %tbird_prefix

%__subst 's|AC_CONFIG_AUX_DIR(\${srcdir}/build/autoconf)|AC_CONFIG_AUX_DIR(build/autoconf)|'

# Add fake RPATH

rpath="/$(printf %%s '%tbird_prefix' |tr '[:print:]' '_')"
export LDFLAGS="$LDFLAGS -Wl,-rpath,$rpath"
export LIBIDL_CONFIG=/usr/bin/libIDL-config-2

%configure \
   --disable-mathml \
   --disable-activex \
   --disable-activex-scripting \
   --disable-tests \
   --disable-oji \
   --disable-plugins \
   --disable-necko-disk-cache \
   --disable-installer \
   --disable-updater \
   --disable-profilesharing \
   --disable-freetype2 \
   --enable-xft \
   --enable-reorder \
   --enable-single-profile \
   --enable-crypto \
   --enable-extensions=default \
   --enable-necko-protocols=http,file,jar,viewsource,res,data \
   --enable-image-decoders=default,-xbm \
   --enable-application=mail \
   --includedir=%_includedir \
   --enable-default-toolkit=gtk2 \
   --enable-optimize="-O2" \
%ifnarch x86_64
   --enable-elf-dynstr-gc \
%if_with debug
   --disable-strip \
   --enable-debug \
   --enable-debug-modules \
   --enable-logrefcnt \
   --enable-debugger-info-modules \
   --enable-detect-webshell-leaks \
   --enable-strip \
   --disable-debug \
%endif # debug
%if_with xprint
   --enable-xprint \
   --disable-postscript \
   --disable-xprint \
%endif # xprint
%if_with branding
   --enable-branding \
   --enable-official-branding \
%if_with nspr
   --with-system-nspr \
%endif # nspr
%if_with nss
   --with-system-nss \
%endif # nss
%if_with libxul
--enable-libxul \
%endif # libxul
%if_with mozldap
   --enable-ldap \
   --with-system-ldap \
   --disable-ldap \
%endif # mozldap
   --with-system-jpeg \
   --with-system-png \
   --with-system-mng \
   --with-system-zlib \
   --with-pthreads \


%__mkdir_p \
   %buildroot/%tbird_arch_extensionsdir \
   %buildroot/%tbird_noarch_extensionsdir \
   %buildroot/%tbird_componentsdir/myspell \

%makeinstall \
   idldir=%buildroot/%tbird_idldir \
   includedir=%buildroot/%tbird_includedir \
   mozappdir=%buildroot/%tbird_prefix \

%SOURCE8 %_includedir %buildroot/%tbird_includedir %tbird_name

# RSS fix

%__cp -rfL dist/bin/isp/* %buildroot/%tbird_prefix/isp/

# copy default *.css

%__install -D -m 644 %SOURCE2 %buildroot/%tbird_defaultsdir/profile/chrome/userContent.css

# install menu file

%__install -m 755 -d %buildroot/%_datadir/applications
%__cp %SOURCE3 %buildroot/%_datadir/applications/%name.desktop

%__install -m 755 %SOURCE9 %buildroot/%tbird_initd/

# icons

%__install -D -m 644 tbird-48.png %buildroot/%_liconsdir/%name.png
%__install -D -m 644 tbird-32.png %buildroot/%_niconsdir/%name.png
%__install -D -m 644 tbird-16.png %buildroot/%_miconsdir/%name.png

# url_handler script

#!/bin/sh -e
[ "\${arg%%%%:*}" = "mailto" ] || arg="mailto:\$arg"
%tbird_exec "\$arg"
chmod +x %buildroot/%tbird_prefix/%tbird_name-mailto

%__tar -xC "%buildroot/%tbird_prefix" -f %SOURCE7

%if_without nspr
# We must rename some file to remove comflicts between Mozilla, Firefox and Thunderbird pckages.
find %buildroot/%_datadir/aclocal -type f -execdir %__mv -f \{\} %tbird_name-\{\} \;

# make devel source packege to build extensions

%make clean

%__mkdir_p %buildroot/%tbird_usrsrc
%__subst 's,/.*/mozilla\(/\|\$\),/ZZZ\1,g' ./config/
%__tar -jcf %buildroot/%_usrsrc/%name/sources.tar.bz2 \
   ./                     \
   ./build                              \
   ./config                                          \
   ./mail                                            \
   ./mailnews                                        \

# Add real RPATH

rpath="/$(printf %%s '%tbird_prefix' |tr '[:print:]' '_')"
find "%buildroot/%tbird_prefix" -type f |
while read f; do
 %__file "$f" | grep -qs ELF || continue
 if chrpath -l "$f" | fgrep -qs "RPATH=$rpath"; then
   chrpath -r "%tbird_prefix" "$f"

if [ -L "%_libdir/%name" ]; then
d="$(readlink -ev "%_libdir/%name" 2>/dev/null)" &&
rm -rf -- "%_libdir/%name" "$d" ||:
if [ -L "%_datadir/%name" ]; then
d="$(readlink -ev "%_datadir/%name" 2>/dev/null)" &&
rm -rf -- "%_datadir/%name" "$d" ||:

if [ "$1" = "0" ]; then
   [ ! -d "%tbird_arch_extensionsdir" ] || %__rm -rf "%tbird_arch_extensionsdir"
   [ ! -d "%tbird_noarch_extensionsdir" ] || %__rm -rf "%tbird_noarch_extensionsdir"
   [ ! -d "%tbird_updatesdir" ] || %__rm -rf "%tbird_updatesdir"



%exclude %tbird_libdir/regxpcom
%exclude %tbird_libdir/xpcshell
%exclude %tbird_libdir/xpicleanup
%exclude %tbird_libdir/xpidl
%exclude %tbird_libdir/xpt_dump
%exclude %tbird_libdir/xpt_link

%files devel

%if_with nss
%exclude %_libdir/pkgconfig/%name-nss.pc

%if_with nspr
%exclude %_libdir/pkgconfig/%name-nspr.pc


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin