Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37533944
en ru br
Репозитории ALT
S:115.2.2-alt1
5.1: 3.1.7-alt0.20110123.M50P.1
4.1: 2.0.0.21-alt0.M41.1
4.0: 2.0.0.21-alt0.M40.1
3.0: 1.0.6-alt2.1
+updates:1.0.8-alt0.M30.1
www.altlinux.org/Changes

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

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

%def_without debug
%def_with branding
%def_with svg
%def_with sqlite
%def_without libxul
%def_with mozldap
%def_with hunspell
%def_with enigmail
%def_with lightning
%def_with gnome

%if_with debug
%set_strip_method none
%endif # debug

%define tbird_prefix                 %_libdir/%name
%define tbird_datadir                %_datadir/%name
%define tbird_idldir                 %_datadir/idl/%name
%define tbird_includedir             %_includedir/%name

%define tbird_arch_extensionsdir     %tbird_prefix/extensions
%define tbird_noarch_extensionsdir   %tbird_datadir/extensions


Summary:        Thunderbird is Mozilla's e-mail client
Name:           thunderbird
Version:        3.1.7
Release:        alt0.20110123.M50P.1
License:        MPL/GPL
Group:          Networking/Mail
URL:            http://www.mozillamessaging.com

Packager: Alexey Gladkov <legion at altlinux.ru>

Source0: thunderbird-source.tar
Source1: thunderbird-icons.tar
Source3: thunderbird.desktop
Source4: thunderbird-enigmail.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: thunderbird-asm-directive.patch
Patch9: thunderbird-install-paths.patch

# https://bugzilla.mozilla.org/show_bug.cgi?id=345134

Patch11: thunderbird-gcc-4.1-fix.patch

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

#Patch20: thunderbird-fix-375292.patch

Patch27: thunderbird-fix-build.patch
#Patch28: thunderbird-use-mozsqlite.patch

BuildRequires(pre): rpm-build-mozilla.org

# Automatically added by buildreq on Fri Mar 24 2006

BuildRequires: doxygen gcc-c++ imake libfreetype-devel libgtk+2-devel libIDL-devel libjpeg-devel
BuildRequires: libpng-devel libXinerama-devel libXp-devel libXt-devel libXft-devel libXext-devel
BuildRequires: unzip xorg-cf-files zip chrpath browser-plugins-npapi-devel makedepend
BuildRequires: mozldap-devel
BuildRequires: libhunspell-devel libalsa-devel python-modules-logging
BuildRequires: libnotify-devel libwireless-devel
BuildRequires: libcairo-devel libpixman-devel

BuildRequires: libnspr-devel       >= 4.8.5-alt0.20100531
BuildRequires: libnss-devel-static >= 3.12.7.0-alt1.20100601
BuildRequires: xulrunner-devel     >= 1.9.2.7-alt1.20100626
BuildRequires: libsqlite3-devel    >= 3.6.23.1-alt2

Provides: mailclient
Obsoletes: thunderbird-calendar

Requires: browser-plugins-npapi
Requires: url_handler   >= 0.2.1-alt2
Requires: libnspr       >= 4.8.5-alt0.20100531
Requires: libnss        >= 3.12.7.0-alt1.20100601
Requires: libsqlite3    >= 3.6.23.1-alt2

BuildRequires: autoconf_2.13
%set_autoconf_version 2.13

%description
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.

%if_with gnome
%package gnome-support
Summary: Thunderbird gnome support
Group: Networking/Mail
Requires: %name = %version-%release
Provides: thunderbird-gnome-support = %version-%release
Obsoletes: thunderbird-gnome-support

BuildRequires: gnome-vfs-devel libgnomeui-devel libgnome-devel libdbus-glib-devel

%description gnome-support
GNOME support in Thunderbird.
%endif

%if_with enigmail
%package enigmail
%define enigmail_ciddir %tbird_arch_extensionsdir/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
#Version: 1.1.2
#Release: alt1
Summary: Enigmail - GPG support for Mozilla Thunderbird
Group: Networking/Mail
Url: http://enigmail.mozdev.org/

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.
%endif

%if_with lightning
%package lightning
%define lightning_ciddir %tbird_arch_extensionsdir/\{e2fda1a4-762b-4020-b5ad-a41df1933103\}
#Version: 1.0.20090301
#Release: alt1
Summary: An integrated calendar for Thunderbird
Group: Office
Url: http://www.mozilla.org/projects/calendar/lightning/

%description lightning
An integrated calendar for Thunderbird.

%package google-calendar
%define google_calendar_ciddir %tbird_noarch_extensionsdir/\{a62ef8ec-5fdc-40c2-873c-223b8a6925cc\}
#Version: 0.9
#Release: alt1
Summary: Provider for Google Calendar
Group: Office
Url: http://www.mozilla.org/projects/calendar/lightning/

Requires: thunderbird-lightning
Provides: gdata-provider = %version-%release

%description google-calendar
Allows bidirectional access to Google Calendar

%package calendar-timezones
%define calendar_timezones_ciddir %tbird_noarch_extensionsdir/calendar-timezones at mozilla.org
#Version: 1.2009a
#Release: alt1
Summary: Timezone Definitions for Mozilla Calendar
Group: Office
Url: http://www.mozilla.org/projects/calendar/lightning/

%description calendar-timezones
Timezone definitions required by Sunbird and Lightning
%endif

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

Requires: rpm-build-mozilla.org

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

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

%if_with enigmail
tar -xf %SOURCE4
mv -f enigmail mailnews/extensions/enigmail
%endif

#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
%patch15 -p1 -b .fix15
##patch20 -p1 -b .fix20
#patch27 -p1 -b .fix27
#patch28 -p1 -b .fix28

echo %version > mail/config/version.txt
echo %version > mail/config/version-191.txt

%build
%add_optflags %optflags_shared
%add_findprov_lib_path %tbird_prefix

sed -i -e 's|AC_CONFIG_AUX_DIR(\${MOZILLA_SRCDIR}/build/autoconf)|AC_CONFIG_AUX_DIR(mozilla/build/autoconf)|' configure.in
%__autoconf

cd mozilla
sed -i -e 's|AC_CONFIG_AUX_DIR(\${srcdir}/build/autoconf)|AC_CONFIG_AUX_DIR(build/autoconf)|' configure.in
ln -s "$PWD/configure" build/autoconf/configure
%__autoconf
cd -

cd mozilla/js/src
sed -i -e 's|AC_CONFIG_AUX_DIR(\${srcdir}/build/autoconf)|AC_CONFIG_AUX_DIR(build/autoconf)|' configure.in
ln -s "$PWD/configure" build/autoconf/configure
%__autoconf
cd -

# 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 \
--includedir=%_includedir \
--disable-activex \
--disable-activex-scripting \
--disable-tests \
--disable-installer \
--disable-updater \
--disable-crashreporter \
--disable-mochitest \
--disable-freetype2 \
--disable-javaxpcom \
--disable-elf-dynstr-gc \
--disable-necko-wifi \
--disable-dbus \
--disable-feeds \
--enable-xft \
--enable-crypto \
--enable-application=mail \
--enable-optimize="-O2" \
--enable-default-toolkit=cairo-gtk2 \
--enable-canvas \
--enable-jemalloc \
--enable-oji \
--enable-old-abi-compat-wrappers \
%if_with debug
--disable-strip \
--enable-debug \
--enable-debug-modules \
--enable-logrefcnt \
--enable-debugger-info-modules \
--enable-detect-webshell-leaks \
%else
--enable-strip \
--enable-install-strip \
--disable-debug \
%endif # debug
%if_with branding
--enable-branding \
--enable-official-branding \
%endif
%if_with svg
--enable-svg \
  --enable-svg-renderer-cairo \
%endif # svg
%if_with libxul
--enable-libxul \
--with-libxul-sdk=%xulr_develdir \
%endif # libxul
%if_with sqlite
--enable-system-sqlite \
%endif # sqlite
%if_with mozldap
--enable-ldap \
--with-system-mozldap \
%else
--disable-ldap \
%endif # mozldap
%if_with hunspell
--enable-system-hunspell \
%endif # hunspell
%if_with lightning
--enable-calendar \
%endif
%if_with gnome
--enable-extensions="default,gnomevfs" \
--enable-gnomeui \
--enable-gnomevfs \
--enable-dbus \
%else
--enable-extensions="default" \
%endif
\
--without-system-png \
--disable-system-lcms \
\
--enable-storage \
--enable-system-cairo \
--with-system-nspr \
--with-system-nss \
--with-system-jpeg \
--with-system-zlib \
--with-system-bz2 \
--with-pthreads \
#

%make_build

%if_with enigmail
dir="$PWD"
cd mailnews/extensions/enigmail
./makemake -r
%make_build
%make_build xpi
mv -f -- \
$dir/mozilla/dist/bin/enigmail-*.xpi \
$dir/mozilla/dist/xpi-stage/enigmail.xpi
%make_build clean
cd -

# everybody lie ... 'make clean' lie!

for f in \
components/enigprefs-service.js \
components/enigMsgCompFields.js \
components/enigmail.js \
components/enigmail.xpt \
components/ipc.xpt \
components/enigmime.xpt \
components/libipc.so \
components/libenigmime.so \
defaults/preferences/enigmail.js \
defaults/pref/enigmail.js \
chrome/enigmail.jar \
chrome/enigmail-skin.jar \
chrome/enigmail-en-US.jar \
chrome/enigmime.jar \
platform/Linux_x86-gcc3/components/libenigmime-x86-gcc3.so \
wrappers/gpg-wrapper.sh;
do
t="$dir/mozilla/dist/bin/$f"
rm -f -- "$t" ||:

t="${t%%/*}"
while [ "$t" != "$dir/mozilla/dist/bin" ]; do
rmdir -- "$t" ||:
t="${t%%/*}"
done
done
%endif

%install
%__mkdir_p \
%buildroot/%_bindir \
%buildroot/%tbird_arch_extensionsdir \
%buildroot/%tbird_noarch_extensionsdir \
%buildroot/%_datadir/applications \
#

# Add real RPATH

rpath="/$(printf %%s '%tbird_prefix' |tr '[:print:]' '_')"
find mozilla/dist/bin mozilla/dist/xpi-stage -type f |
while read f; do
t="$(readlink -ev "$f")"
file "$t" | grep -qs ELF || continue
if chrpath -l "$t" | fgrep -qs "RPATH=$rpath"; then
chrpath -r "%tbird_prefix" "$t"
fi
done

# thunderbird3 uninstallable

find -L mozilla/dist/bin ! -type d -printf '%%h %%f\n' |
while read b f; do
d="${b#mozilla/dist/bin}"
mkdir -p --    "%buildroot/%tbird_prefix/$d"
cp -pL "$b/$f" "%buildroot/%tbird_prefix/$d/$f"
done

rm -rf -- \
%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 \
#

sed -i \
-e 's,^\(Version\)=.*,\1=%version,g' \
-e 's,^\(MaxVersion\)=.*,\1=1.9.3*,g' \
%buildroot/%tbird_prefix/application.ini

mv -f -- %buildroot/%tbird_prefix/thunderbird %buildroot/%_bindir/

# desktop file

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

# 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

cat>%buildroot/%tbird_prefix/%name-mailto<<-EOF
#!/bin/sh -e
arg="\$*"
[ "\${arg%%%%:*}" = "mailto" ] || arg="mailto:\$arg"
%_bindir/thunderbird "\$arg"
EOF
chmod +x %buildroot/%tbird_prefix/%name-mailto

# rpm-build-thunderbird files

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

cp -a rpm/rpm-build/rpm.macros %buildroot/%_sysconfdir/rpm/macros.d/%name
cp -at %buildroot/%_rpmlibdir -- rpm/rpm-build/thunderbird.req*

sed -i \
-e 's, at tbird_version at ,%version,' \
-e 's, at tbird_release at ,%release,' \
%buildroot/%_sysconfdir/rpm/macros.d/%name

%if_with enigmail
mkdir -p %buildroot/%enigmail_ciddir
unzip -q -u -d %buildroot/%enigmail_ciddir -- \
mozilla/dist/xpi-stage/enigmail.xpi
%endif

%if_with lightning
mkdir -p %buildroot/%lightning_ciddir
unzip -q -u -d %buildroot/%lightning_ciddir -- \
mozilla/dist/xpi-stage/lightning.xpi

mkdir -p %buildroot/%google_calendar_ciddir
unzip -q -u -d %buildroot/%google_calendar_ciddir -- \
mozilla/dist/xpi-stage/gdata-provider.xpi

mkdir -p %buildroot/%calendar_timezones_ciddir
unzip -q -u -d %buildroot/%calendar_timezones_ciddir -- \
mozilla/dist/xpi-stage/calendar-timezones.xpi
rm -rf -- %buildroot/%tbird_arch_extensionsdir/calendar-timezones at mozilla.org
%endif

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

%preun
if [ "$1" = "0" ]; then
[ ! -d "%tbird_arch_extensionsdir" ] || rm -rf "%tbird_arch_extensionsdir"
[ ! -d "%tbird_noarch_extensionsdir" ] || rm -rf "%tbird_noarch_extensionsdir"
fi

%files
%_bindir/*
%tbird_prefix
%tbird_datadir
%defattr(0644,root,root,0755)
%_datadir/applications/%name.desktop
%_niconsdir/%name.png
%_miconsdir/%name.png
%_liconsdir/%name.png
%if_with enigmail
%exclude %enigmail_ciddir
%endif
%if_with lightning
%exclude %lightning_ciddir
%exclude %google_calendar_ciddir
%exclude %calendar_timezones_ciddir
%endif
%if_with gnome
%exclude %tbird_prefix/components/libnkgnomevfs.so
%exclude %tbird_prefix/components/libmozgnome.so
%endif

%if_with gnome
%files gnome-support
%tbird_prefix/components/libnkgnomevfs.so
%tbird_prefix/components/libmozgnome.so
%endif

%if_with enigmail
%files enigmail
%enigmail_ciddir
%endif

%if_with lightning
%files lightning
%lightning_ciddir

%files google-calendar
%google_calendar_ciddir

%files calendar-timezones
%calendar_timezones_ciddir
%endif

%files -n rpm-build-thunderbird
%_rpmlibdir/*
%_sysconfdir/rpm/macros.d/%name

%changelog

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

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