Репозиторий Sisyphus
Последнее обновление: 2 февраля 2023 | Пакетов: 18159 | Посещений: 26618359
en ru br
Репозитории ALT
5.1: 3.1.7-alt0.20110123.M50P.1
3.0: 1.0.6-alt2.1

Группа :: Сети/Почта
Пакет: thunderbird

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%def_with enigmail
%define r_name thunderbird
%ifndef build_parallel_jobs
%define build_parallel_jobs 7

%define enigmail_version  2.0.4
%define gdata_version     2.6

Summary: Thunderbird is Mozilla's e-mail client
Name: thunderbird
Version: 52.8.0
Release: alt1
License: MPL/GPL
Group: Networking/Mail
URL: https://www.thunderbird.net

Packager: Andrey Cherepanov <cas at altlinux.org>

Source0: %name-%version.tar
Source1: enigmail-source.tar
Source2: rpm-build.tar
Source3: thunderbird.desktop
Source4: thunderbird-mozconfig
Source5: thunderbird-default-prefs.js

Patch6: 01_locale.patch
Patch8: thunderbird-timezones.patch
Patch9: thunderbird-install-paths.patch
Patch11: thunderbird-alt-allow-send-in-windows-1251.patch

BuildRequires(pre): mozilla-common-devel
BuildRequires(pre): rpm-build-mozilla.org
BuildRequires(pre): browser-plugins-npapi-devel

BuildRequires: doxygen gcc-c++ imake libIDL-devel makedepend
BuildRequires: libXt-devel libX11-devel libXext-devel libXft-devel libXScrnSaver-devel libXcomposite-devel libXdamage-devel
BuildRequires: libcurl-devel libgtk+2-devel libhunspell-devel libjpeg-devel
BuildRequires: xorg-cf-files chrpath alternatives yasm
BuildRequires: bzlib-devel zlib-devel
BuildRequires: mozldap-devel
BuildRequires: zip unzip
BuildRequires: gstreamer1.0-devel gst-plugins1.0-devel
BuildRequires: libcairo-devel libpixman-devel
BuildRequires: libGL-devel
BuildRequires: libwireless-devel
BuildRequires: libalsa-devel
BuildRequires: libnotify-devel
BuildRequires: libevent-devel
BuildRequires: libvpx-devel
BuildRequires: libgio-devel
BuildRequires: libfreetype-devel fontconfig-devel
BuildRequires: libstartup-notification-devel
BuildRequires: libffi-devel
BuildRequires: libproxy-devel
BuildRequires: libopus-devel
BuildRequires: libpulseaudio-devel
BuildRequires: libXcomposite-devel
BuildRequires: libXdamage-devel

# Python requires

BuildRequires: python-module-distribute
BuildRequires: python-modules-compiler
BuildRequires: python-modules-logging
BuildRequires: python-modules-sqlite3
BuildRequires: python-modules-json

# Mozilla requires

BuildRequires: libnspr-devel
BuildRequires: libnss-devel
BuildRequires: libnss-devel-static

Provides: mailclient
Obsoletes: thunderbird-calendar
Obsoletes: thunderbird-calendar-timezones

Provides: thunderbird-gnome-support = %version-%release
Obsoletes: thunderbird-gnome-support

Requires: hunspell-en
Requires: browser-plugins-npapi

Provides: %name-esr = %version-%release
Obsoletes: %name-esr < %version-%release
Provides: %name-lightning = %version-%release
Obsoletes: %name-lightning < %version-%release
Provides: %name-esr-lightning = %version-%release
Obsoletes: %name-esr-lightning < %version-%release

# Protection against fraudulent DigiNotar certificates

Requires: libnss >= 3.13.1-alt1

BuildRequires: autoconf_2.13
%set_autoconf_version 2.13

%define tbird_cid                    \{3550f703-e582-4d05-9a08-453d09bdfdc6\}
%define tbird_prefix                 %_libdir/%r_name
%define tbird_datadir                %_datadir/%r_name
%define tbird_idldir                 %_datadir/idl/%r_name
%define tbird_includedir             %_includedir/%r_name
%define tbird_develdir               %tbird_prefix-devel

Thunderbird is Mozilla's next generation e-mail client.
Thunderbird makes emailing safer, faster and easier than
ever before and can also scale to meet the most sophisticated
organizational needs.
The package contains Lightning - an integrated calendar for Thunderbird.

%if_with enigmail
%package enigmail
%define enigmail_ciddir %mozilla_arch_extdir/%tbird_cid/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
Summary: Enigmail - GPG support for Mozilla Thunderbird
Group: Networking/Mail
Url: https://www.enigmail.net/

Provides:  %name-enigmail = %enigmail_version-%release
Provides:  %name-esr-enigmail = %version-%release
Obsoletes: %name-esr-enigmail < %version-%release
Requires: %name = %version-%release

Obsoletes: thunderbird-enigmail < 0.95.7-alt2

%description enigmail
Enigmail is an extension to the mail client of Mozilla / Netscape 7.x
which allows users to access the authentication and encryption features
provided by the popular GnuPG software.

%package google-calendar
%define google_calendar_ciddir %mozilla_noarch_extdir/%tbird_cid/\{a62ef8ec-5fdc-40c2-873c-223b8a6925cc\}
Summary: Provider for Google Calendar
Group: Office
Url: https://www.mozilla.org/projects/calendar

Provides: %name-google-calendar = %gdata_version-%release
Requires: %name = %version-%release

Provides: gdata-provider = %gdata_version-%release
Provides:  %name-esr-google-calendar = %version-%release
Obsoletes: %name-esr-google-calendar < %version-%release

%description google-calendar
Allows bidirectional access to Google Calendar

%package devel
Summary: Thunderbird development kit.
Group: Development/C++
Requires: %name = %version-%release

Requires: python-base
AutoReq: yes, nopython
Provides:   %name-esr-devel = %version-%release
Obsoletes: %name-esr-devel < %version-%release

%description devel
Thunderbird development kit.

%package -n rpm-build-%name
Summary: RPM helper macros to rebuild thunderbird packages
Group: Development/Other
BuildArch: noarch

Requires: mozilla-common-devel
Requires: rpm-build-mozilla.org

%description -n rpm-build-%name
These helper macros provide possibility to rebuild
thunderbird packages by some Alt Linux Team Policy compatible way.

%setup -q

%if_with enigmail
tar -xf %SOURCE1

tar -xf %SOURCE2

%patch6 -p1
#patch8 -p2
%patch9 -p2
%patch11 -p2

#echo %version > mail/config/version.txt

cp -f %SOURCE4 .mozconfig

echo 'ac_add_options --enable-calendar' >> .mozconfig

sed -i -e '\,hyphenation/,d' mail/installer/removed-files.in

%add_optflags %optflags_shared
%add_findprov_lib_path %tbird_prefix

# Add fake RPATH

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

export MOZ_BUILD_APP=mail

# -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 "%optflags -fpermissive" | \
                     sed -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g')
# Disable null pointer gcc6 optimization - workaround for
# https://bugzilla.mozilla.org/show_bug.cgi?id=1278795
MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fno-delete-null-pointer-checks -fno-schedule-insns2"

%ifarch aarch64 x86_64

export PREFIX='%_prefix'
export LIBDIR='%_libdir'
export INCLUDEDIR='%_includedir'
export LIBIDL_CONFIG='/usr/bin/libIDL-config-2'
export srcdir="$PWD"
export SHELL=/bin/sh


[ "%__nprocs" -ge 2 ] && MOZ_SMP_FLAGS=-j2
[ "%__nprocs" -ge 4 ] && MOZ_SMP_FLAGS=-j4

mkdir objdir mozilla/objdir

export NPROCS=%build_parallel_jobs
make -f client.mk \
STRIP="/bin/true" \
mozappdir=%buildroot/%tbird_prefix \

%if_with enigmail

cd enigmail
make \
STRIP="/bin/true" \
mkdir -p -- \
mv -f -- \
build/dist \
cd -

export SHELL=/bin/sh
mkdir -p \
%buildroot/%_bindir \
%buildroot/%mozilla_arch_extdir/%tbird_cid \
%buildroot/%mozilla_noarch_extdir/%tbird_cid \
%buildroot/%_datadir/applications \

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

#(set +x

# for l in libldap60.so libldif60.so libprldap60.so; do
# [ -f .%xulr_prefix/$l ] ||
# continue
# mv -f -- .%tbird_prefix/$l .%_libdir/$l
# ln -vs -- "$(relative %_libdir/$l %tbird_prefix/$l)" .%tbird_prefix/$l
# done

(set +x
for f in %buildroot/%tbird_develdir/*; do
[ -L "$f" ] || continue

t="$(readlink "$f")"
r="$(relative "${t#%buildroot}" "${f#%buildroot}")"

ln -vnsf -- "$r" "$f"

(set +x
rm -vrf -- %buildroot/%tbird_prefix/dictionaries/*
for suf in aff dic; do
t="$(relative %_datadir/myspell/en_US.$suf %tbird_prefix/dictionaries/)"
ln -vs "$t" %buildroot/%tbird_prefix/dictionaries/en-US.$suf

rm -rf -- \
%buildroot/%_bindir/thunderbird \
%buildroot/%tbird_prefix/js \
%buildroot/%tbird_prefix/regxpcom \
%buildroot/%tbird_prefix/xpcshell \
%buildroot/%tbird_prefix/xpidl \
%buildroot/%tbird_prefix/xpt_dump \
%buildroot/%tbird_prefix/xpt_link \
%buildroot/%tbird_prefix/nsinstall \
%buildroot/%tbird_prefix/removed-files \
%buildroot/%tbird_prefix/thunderbird \
%buildroot/%tbird_prefix/run-mozilla.sh \
%buildroot/%tbird_prefix/README.txt \


sed -i \
-e "s,^\\(MaxVersion\\)=.*,\\1=$maxver,g" \
-e "s,^\\(MinVersion\\)=.*,\\1=$minver,g" \

# desktop file

install -D -m 644 %SOURCE3 %buildroot/%_datadir/applications/thunderbird.desktop

# install altlinux-specific configuration

install -D -m 644 %SOURCE5 %buildroot/%tbird_prefix/defaults/pref/all-altlinux.js

# icons

for s in 16 22 24 32 48 256; do
install -D -m 644 \
other-licenses/branding/thunderbird/mailicon$s.png \

# main startup script

#!/bin/sh -e
export MOZ_PLUGIN_PATH="%browser_plugins_path\${MOZ_PLUGIN_PATH:+:\$MOZ_PLUGIN_PATH}"
%tbird_prefix/thunderbird-bin \${1:+"\$ at "}
chmod 755 %buildroot/%_bindir/thunderbird

# rpm-build-thunderbird files

mkdir -p %buildroot/%_sysconfdir/rpm/macros.d

cp -a rpm-build/rpm.macros %buildroot/%_sysconfdir/rpm/macros.d/%r_name

sed -i \
-e 's, at tbird_version at ,%version,' \
-e 's, at tbird_release at ,%release,' \

%if_with enigmail
mv -f -- \
$PWD/objdir/mozilla/dist/enigmail \

mkdir -p %buildroot/%google_calendar_ciddir
unzip -q -u -d %buildroot/%google_calendar_ciddir -- \

# Add real RPATH

(set +x
rpath="/$(printf %%s '%tbird_prefix' |tr '[:print:]' '_')"

find \
%buildroot/%tbird_prefix \
%buildroot/%tbird_develdir \
%buildroot/%mozilla_arch_extdir/%tbird_cid \
-type f |
while read f; do
t="$(readlink -ev "$f")"

file "$t" | fgrep -qs ELF || continue

if chrpath -l "$t" | fgrep -qs "RPATH=$rpath"; then
chrpath -r "%tbird_prefix" "$t"


%if_with enigmail
%exclude %enigmail_ciddir
%exclude %google_calendar_ciddir

%if_with enigmail
%files enigmail

%files google-calendar

%files devel

%files -n rpm-build-%name


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin