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

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

#
# $Id: firefox.spec,v 1.0 2004/10/21 15:48:39 legion Exp $
#

%define cvs_date 20050420
%define cvs_tag AVIARY_1_0_1_20050124_BRANCH

Summary:        The Mozilla Firefox project is a redesign of Mozilla's browser
Name:           firefox
Version:        1.0.4
Release:       alt0.M24.2.cvs%cvs_date
License:        MPL
Group:          Networking/WWW
URL:            http://www.mozilla.org/projects/firefox/

Source0: %name-snapshot-%cvs_tag-%cvs_date.tar.bz2
Source1: %name-1.0-icons.tar.bz2
Source3: %name-build-scripts.tar.bz2
Source4: rpm.macros.%name
Source5: %name-rebuild-databases.sh
Source6: .mozconfig-firefox
Source7: %name-searchplugins-addon-1.1.tar.bz2
Source8: %name-1.0-alt-rpm-scripts.tar.bz2
Source9: %name-0.9-alt-ssl-addon-certs.txt
Source10: %name.desktop

Patch1: %name-1.0-alt-browser-home-page.patch
Patch2: %name-1.0-alt-add-plugins-dir.patch
Patch3: %name-1.0-20050201-alt-nox.patch
Patch4: %name-1.0-alt-binary-paths-fix.patch
Patch6: %name-configure_in.patch
Patch7: %name-1.0-alt-url-handler.patch
Patch8: %name-1.0-alt-prefs-tuning.patch
Patch9: %name-1.0-user-searchplugins-dir.patch
Patch10: %name-190031.branch3.patch
Patch11: %name-234035-4xftonly.patch
Patch12: %name-1.0.1-layout-svg-cairo.patch

# Automatically added by buildreq on Tue Jul 13 2004

BuildRequires: XFree86-devel-static XFree86-libs doxygen fontconfig-devel freetype2-devel
BuildRequires: gcc-c++ glib2-devel libIDL-devel libatk-devel libgtk+2-devel libjpeg-devel
BuildRequires: libpango-devel libpng-devel libstdc++-devel pkgconfig unzip zip zlib-devel
BuildRequires: chrpath menu-devel cairo-devel >= 0.3.0 libpixman-devel >= 0.1.3

Requires: gtk+2 >= 2.2.0 url_handler >= 0.2.1-alt1.M24.1 freetype2 indexhtml
Provides: webclient

Conflicts:      firefox < 0.9

%define fullname %name-%version
%define firefox_prefix  %_libdir/%fullname

%description
The Mozilla Firefox project is a redesign of Mozilla's browser component,
written using the XUL user interface language and designed to be
cross-platform.

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

%description devel
Mozilla Firefox 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 -a3

%patch1 -p1 -b .browser-home-page
%patch2 -p1 -b .plugindirs
%patch3 -p1 -b .nox
%patch4 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p0
%patch11 -p0
%patch12 -p1

# change .mozconfig

%__cp -f %SOURCE6 ./.mozconfig

# additional CA certificates

cd %_builddir/%name-%version/mozilla/security/nss/lib/ckfw/builtins
cat %SOURCE9 >> certdata.txt
%make generate

%build
%add_optflags %optflags_shared
%add_findprov_lib_path %_libdir/%fullname
export MOZ_PHOENIX=1 MOZILLA_OFFICIAL=1 BUILD_OFFICIAL=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 \
--prefix=%_prefix \
--includedir=%_includedir/%name \
--disable-tests \
--disable-debug \
--disable-timeline \
--disable-debug-modules \
--disable-debugger-info-modules \
--disable-installer \
--disable-logging \
--disable-xprint \
--disable-mailnews \
--disable-composer \
--disable-freetype2 \
--disable-ldap \
--disable-profilesharing \
--disable-profilelocking \
--disable-gnomevfs \
--enable-single-profile \
--enable-jsd \
--enable-xft \
--enable-crypto \
--enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,gnomevfs,negotiateauth \
--enable-necko-protocols=all \
--enable-default-toolkit=gtk2 \
--enable-cpp-exceptions \
--enable-cpp-rtti \
--enable-reorder \
--enable-strip \
--enable-shared \
--enable-svg \
  --enable-svg-renderer-cairo \
--with-system-jpeg \
--with-system-png \
--with-system-zlib \
--with-pthreads

%make_build \
prefix=%_prefix \
idldir=%_datadir/idl/%name \
mozappdir=%_libdir/%fullname \
MOZ_PHOENIX=1

%install
%__mkdir_p %buildroot/%_libdir/%fullname/install
%__mkdir_p %buildroot/%_datadir/%fullname/scripts

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

# make package link

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

# Add search plugins

cd %buildroot/%_libdir/%name
%__tar jxf %SOURCE7
cd -

# install menu file

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

# Menu

mkdir -p %buildroot/%_menudir
cat > %buildroot/%_menudir/%name << EOF
?package(%name): \
command="%_bindir/%name" \
needs="X11" \
icon="%name.png" \
section="Networking/WWW" \
title="Mozilla Firefox" \
longtitle="The Mozilla Firefox project is a redesign of Mozilla's browser"
EOF

# icons

%__install -D -m 644 mozicon48.png %buildroot/%_liconsdir/%name.png
%__install -D -m 644 mozicon32.png %buildroot/%_iconsdir/%name.png
%__install -D -m 644 mozicon16.png %buildroot/%_miconsdir/%name.png

# RPM MACRO

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

cd %buildroot/%_datadir/%fullname/scripts
%__tar jxf %SOURCE8
cd -

# move Firefox stuff

%__mkdir_p %buildroot/%_libdir/%fullname
%__install -D -m 600 %SOURCE5 %buildroot/%_libdir/%fullname/rebuild-databases.sh

# 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 pаckages.

find %buildroot/%_datadir/aclocal -type f |
while read 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

%__tar -jcf %buildroot/%_usrsrc/%name/sources.tar.bz2 \
   ./makemake.sh ./build_dist.sh find_install.sh     \
   ./%name-content-index                             \
   ./build                                           \
   ./config                                          \
   ./browser                                         \
   ./.mozconfig                                      \
   ./mozilla-config.h

# Add real RPATH

chrpath -r %_libdir/%fullname \
%buildroot/%_libdir/%name/%name-bin \
%buildroot/%_libdir/%name/mozilla-xremote-client \
%buildroot/%_libdir/%name/regchrome \
%buildroot/%_libdir/%name/regxpcom

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

%post
%update_menus
%_datadir/%fullname/scripts/firefox_register.sh %_bindir/%name

%postun
%clean_menus

%files
%_bindir/%name
%_libdir/%name
%_libdir/%fullname
%_datadir/%name
%_datadir/%fullname
%_datadir/%fullname/scripts
%defattr(0644,root,root,0755)
%_menudir/*
%_datadir/applications/%name.desktop
%_iconsdir/%name.png
%_miconsdir/%name.png
%_liconsdir/%name.png
%doc LEGAL LICENSE

%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