Sisyphus repository
Last update: 28 march 2020 | SRPMs: 17545 | Visits: 17770851
en ru br
ALT Linux repos
S:68.6.0-alt1
5.0: 2.0.0.21-alt0.M50.3
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

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

%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:           thunderbird
Version:        1.0.6
Release:       alt2.1
License:        MPL
Group:          Networking/Mail
URL:            http://www.mozilla.org/projects/thunderbird/

Source0: %name-%version-source.tar.bz2
Source1: %name-1.0-icons.tar.bz2
Source2: %name.userContent.css
Source3: %name.desktop
Source4: %name-1.0.6-alt-rpm-scripts.tar.bz2
Source5: .mozconfig-thunderbird
Source6: %name-addon-scripts.tar.bz2
Source7: %name-build-scripts.tar.bz2
Source8: rpm.macros.%name
Source9: %name.firsttime
Source10: S10thunderbird.common.langs.sh
Source11: S000userhome.sh

Patch0: %name-configure_in.patch
Patch1: %name-1.0-alt-script-fix.patch
Patch4: %name-0.9-alt-url_handler.patch
Patch5: %name-1.0-20050201-alt-nox.patch

# Automatically added by buildreq on Thu Nov 20 2003

BuildRequires: xorg-x11-libs fontconfig-devel freetype2-devel gcc-c++
BuildRequires: glib2-devel libIDL-devel libatk-devel libexpat libgtk+2-devel libjpeg-devel
BuildRequires: libpango-devel libpng-devel libstdc++-devel pkgconfig unzip zip zlib-devel
BuildRequires: libmng-devel menu-devel chrpath

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

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

%define fullname %name-%version
%define tbird_prefix %_libdir/%fullname
%define tbird_datadir %_datadir/%fullname
%define tbird_initd %tbird_prefix/init.d
%define tbird_extensionsdir %tbird_prefix/extensions
%define tbird_componentsdir %tbird_prefix/components
%define tbird_defaultsdir %tbird_prefix/defaults

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

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

chmod a+rX .

%patch0 -p1
%patch1 -p1
%patch4 -p1
%patch5 -p1

# change .mozconfig

%__cp -f %SOURCE5 ./.mozconfig

%build
%add_findprov_lib_path %tbird_prefix
export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
export MOZ_THUNDERBIRD=1
export LIBIDL_CONFIG=/usr/bin/libIDL-config-2

# Add fake RPATH

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

%configure \
   --enable-crypto \
   --disable-mathml \
   --disable-activex \
   --disable-activex-scripting \
   --disable-tests \
   --disable-oji \
   --disable-plugins \
   --disable-necko-disk-cache \
   --enable-single-profile \
   --disable-profilesharing \
   --enable-extensions=wallet,spellcheck,xmlextras,webservices \
   --enable-necko-protocols=http,file,jar,viewsource,res,data \
   --enable-image-decoders=default,-xbm \
   \
   --prefix=%_prefix \
   --enable-default-toolkit=gtk2 \
%ifnarch x86_64
   --enable-elf-dynstr-gc \
%endif
%if_with debug
   --disable-strip \
   --enable-debug \
   --enable-debug-modules \
   --enable-logrefcnt \
   --enable-debugger-info-modules \
   --enable-detect-webshell-leaks \
%else
   --enable-strip \
   --disable-debug \
%endif # debug
%if_with xprint
   --enable-xprint \
   --disable-postscript \
%else
   --disable-xprint \
%endif # xprint
   --disable-installer \
   --with-system-jpeg \
   --with-system-png \
   --with-system-mng \
   --with-system-zlib \
   --with-pthreads \
   --enable-reorder \
   --enable-cpp-exceptions \
   --enable-cpp-rtti \
   --enable-old-abi-compat-wrappers \
   --disable-freetype2 \
   --enable-xft

%make_build \
   prefix=%_prefix \
   idldir=%_datadir/idl/%name \
   includedir=%_includedir/%name \
   mozappdir=%tbird_prefix \
   MOZ_THUNDERBIRD=1

%install
%makeinstall \
   idldir=%buildroot/%_datadir/idl/%name \
   includedir=%buildroot/%_includedir/%name \
   mozappdir=%buildroot/%tbird_prefix \
   MOZ_THUNDERBIRD=1

%__mkdir_p %buildroot/%tbird_componentsdir/myspell

# make package link

%__ln_s %fullname %buildroot/%_libdir/%name

#RSS fix

%__cp -rL dist/bin/defaults/isp %buildroot/%tbird_defaultsdir/

# copy default *.css

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

# install menu file

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

freedesktop2menu.pl \
%name \
       "Networking/Mail" \
%buildroot/%_datadir/applications/%name.desktop \
%buildroot/%_menudir/%name \
x11

# icons

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

%__mkdir_p %buildroot/%tbird_datadir/scripts
cd %buildroot/%_datadir/%fullname/scripts
   %__tar jxf %SOURCE4
cd -

cd %buildroot/%tbird_prefix
   %__tar jxf %SOURCE6
cd -

# RPM MACRO

%__mkdir_p %buildroot%_sysconfdir/rpm/macros.d
%__cp %SOURCE8 %buildroot%_sysconfdir/rpm/macros.d/%name

# Install firsttime script.

%__install -D -m 755 %SOURCE9                                      %buildroot/%_sysconfdir/firsttime.d/%name-%version
%__subst 's, at tbird_bin at ,%_bindir/%name,g'                          %buildroot/%_sysconfdir/firsttime.d/%name-%version
%__subst 's, at tbird_run at ,%tbird_prefix/run-mozilla.sh,g'            %buildroot/%_sysconfdir/firsttime.d/%name-%version
%__subst 's, at tbird_scriptdir at ,%_datadir/%fullname/scripts,g'       %buildroot/%_sysconfdir/firsttime.d/%name-%version
%__subst 's, at tbird_extensionsdir at ,%tbird_extensionsdir,g'          %buildroot/%_sysconfdir/firsttime.d/%name-%version

# Install script to switch language after language packs installation.

%__install -D -m 755 %SOURCE10                                     %buildroot/%tbird_initd/S10thunderbird.common.langs.sh
%__subst 's, at tbird_extensionsdir at ,%tbird_extensionsdir,g'          %buildroot/%tbird_initd/S10thunderbird.common.langs.sh

#ALT-specific

%__install -D -m 755 %SOURCE11                                     %buildroot/%tbird_initd/S000userhome.sh

# We must rename some file to remove comflicts between Mozilla, Firefox and Thunderbird pckages.

for f in $(find %buildroot/%_datadir/aclocal -type f); do
%__mv -f $f %buildroot/%_datadir/aclocal/%name-${f##*/}
done

# make devel source packege to build extensions

%__mkdir_p %buildroot/%_usrsrc/%name
find %buildroot/%_libdir/%name      \
    %buildroot/%_includedir/%name  \
    %buildroot/%_datadir/idl/%name \
-follow -xtype f |sed 's,^%buildroot/\(.*\)$,\1,' > ./%name-content-index

%make clean
%__mkdir_p %buildroot/%_usrsrc/%name
%__subst 's,/.*/mozilla\(/\|\$\),/ZZZ\1,g' ./config/autoconf.mk
%__tar -jcf %buildroot/%_usrsrc/%name/sources.tar.bz2 \
   ./makemake.sh ./build_dist.sh find_install.sh     \
   ./%name-content-index                             \
   ./build                              \
   ./config                                          \
   ./mail                                            \
   ./mailnews                                        \
   ./.mozconfig                                      \
   ./mozilla-config.h

# 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"
 fi
done

%preun
if [ "$1" = "0" ]; then
[ ! -d "%tbird_prefix/extensions" ] || %__rm -rf "%tbird_prefix/extensions"
[ ! -d "%tbird_prefix/chrome/overlayinfo" ] || %__rm -rf "%tbird_prefix/chrome/overlayinfo"
[ ! -f "%tbird_prefix/defaults.ini" ] || %__rm -f "%tbird_prefix/defaults.ini"
   %__rm -f %tbird_prefix/chrome/*.rdf
   %__rm -f %tbird_prefix/component.reg
   %__rm -f %tbird_prefix/components.ini
   %__rm -f %tbird_prefix/components/*.dat
fi

%post
%update_menus
[ -n "$DURING_INSTALL" ] ||
   %_datadir/%fullname/scripts/tbird_register.sh %tbird_prefix/%name-bin

%postun
%clean_menus

%files
%doc mail/app/README.txt LEGAL mail/LICENSE.txt
%_bindir/%name
%_libdir/%name
%_libdir/%fullname
%tbird_datadir
%_sysconfdir/firsttime.d/%name-%version
%defattr(0644,root,root,0755)
%_datadir/applications/%name.desktop
%_menudir/*
%_iconsdir/*.png
%_miconsdir/*.png
%_liconsdir/*.png

%files devel
%_sysconfdir/rpm/macros.d/%name
%_bindir/%name-config
%_includedir/%name
%_datadir/aclocal/*
%_datadir/idl/%name
%_libdir/pkgconfig/*
%_usrsrc/%name

%changelog

Full changelog you can see here

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