Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1560464
 поиск   регистрация   авторизация 
 
Группа :: Сети/Почта
Пакет: thunderbird

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

# -*- mode: RPM-SPEC; coding: utf-8 -*-
Summary:        Mozilla Thunderbird is a redesign of the Mozilla mail component.
Summary(ru_RU.UTF-8): Mozilla Thunderbird - я█я┌п╬ я─п╣п╦п╫п╨п╟я─п╫п╟я├п╦я▐ п©п╬я┤я┌п╬п╡п╬п╧ п╨п╬п╪п©п╬п╫п╣п╫я┌я▀ Mozilla
Name:           thunderbird
Version:        1.0.2
Release:       alt0.M24
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-alt-rpm-scripts.tar.bz2
Source5: .mozconfig-thunderbird
Source6: %name-addon-scripts.tar.bz2
Source7: %name-build-scripts.tar.bz2
Source8: rpm.macros.%name

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: XFree86-libs fontconfig-devel freetype2-devel gcc-c++
BuildRequires: glib2-devel libIDL-devel libatk-devel libexpat libgtk+2-devel libjpeg-devel
BuildRequires: libpango-devel libpng3-devel libstdc++-devel pkgconfig unzip zip zlib-devel
BuildRequires: libmng-devel menu-devel chrpath

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

%define fullname %name-%version
%define tbird_prefix %_libdir/%name
%define tbird_datadir %_datadir/%fullname
%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 %_libdir/%fullname
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 '%_libdir/%fullname' |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
   --disable-debug \
   --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=%_libdir/%fullname \
   MOZ_THUNDERBIRD=1

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

# 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

# make backup installed-chrome.txt to make possible addons installion

%__cp -p %buildroot/%_libdir/%fullname/chrome/installed-chrome.txt \
   %buildroot/%_libdir/%fullname/chrome/installed-chrome-%name.txt

# 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 '%_libdir/%fullname' |tr '[:print:]' '_')"
find "%buildroot/%_libdir/%name/" \
 -name '%name-bin' \
 -o -name 'mozilla-xremote-client' \
 -o -name 'regchrome' \
 -o -name 'regxpcom' \
 -o -name '*.so' |
while read f; do
 if chrpath -l "$f" | fgrep -qs "RPATH=$rpath"; then
 chrpath -r "%_libdir/%fullname" "$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
%_datadir/%fullname/scripts/tbird_register.sh '%_bindir/%name'

%postun
%clean_menus

%files
%doc mail/app/README.txt LEGAL mail/LICENSE.txt
%_bindir/%name
%_libdir/%name
%_libdir/%fullname
%tbird_datadir
%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

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

 
design & coding: Vladimir Lettiev aka crux © 2004-2005