Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37236979
en ru br
Репозитории ALT
S:118.0-alt1
4.1: 3.0.9-alt0.M41.1
+updates:3.0.4-alt0.M41.2
4.0: 2.0.0.18-alt0.M40.1
3.0: 1.0.7-alt3
+updates:1.0.8-alt0.M30.1
www.altlinux.org/Changes

Группа :: Сети/WWW
Пакет: firefox

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

#
# $Id: firefox.spec,v 1.0 2004/10/21 15:48:39 legion Exp $
#
%def_without debug
%def_without svg
%def_with    xprint
%def_with    branding

%if_with debug
%set_strip_method none
%endif # debug

Summary:        The Mozilla Firefox project is a redesign of Mozilla's browser
Name:           firefox
Version:        1.0.7
Release:       alt3
License:        MPL
Group:          Networking/WWW
URL:            http://www.mozilla.org/projects/firefox/

Source0: %name-%version-source.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.0.tar.bz2
Source8: %name-1.0.5-alt-rpm-scripts.tar.bz2
Source9: %name-0.9-alt-ssl-addon-certs.txt
Source10: %name.desktop
Source11: %name.firsttime
Source12: S10firefox.common.langs.sh
Source13: S000userhome.sh

Patch1: firefox-1.0.6-alt-browser-home-page.patch
Patch2: firefox-1.0.7-alt-run-mozilla.patch
Patch3: firefox-1.0.6-20050724.1-alt-nox.patch
Patch6: firefox-configure_in.patch
Patch7: firefox-1.0-alt-url-handler.patch
Patch8: firefox-1.0.5-alt-prefs-tuning.patch
Patch9: firefox-1.0-user-searchplugins-dir.patch
Patch10: firefox-190031.branch3.patch
Patch11: firefox-234035-4xftonly.patch
Patch12: firefox-1.0.1-layout-svg-cairo.patch

Patch13: firefox-1.0.3-certdata-perl-fix.patch
Patch14: firefox-1.0.3-nss-make-fix.patch
Patch15: mozilla-1.7.9-alt-gssapi.patch

# Mandriva patches


Patch20: mozilla-firefox-1.0-lib64-nspr.patch.bz2
Patch21: mozilla-firefox-1.0-lib64.patch.bz2
Patch22: mozilla-firefox-1.0.6-fixwarnings.patch.bz2

# Security fixes


# Automatically added by buildreq on Tue Jul 13 2004

BuildRequires: xorg-x11-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 browser-plugins-npapi-devel

BuildRequires: autoconf_2.13

%{?_with_svg:BuildRequires: cairo-devel libpixman-devel}

Requires: gtk+2 >= 2.2.0 url_handler >= 0.2.1-alt2 freetype2 indexhtml browser-plugins-npapi zip
Provides: webclient

Conflicts:      firefox < 0.9

%define fullname %name-%version
%define firefox_prefix   %_libdir/%fullname
%define firefox_run %firefox_prefix/run-mozilla.sh
%define firefox_extensionsdir %firefox_prefix/extensions
%define firefox_initd %firefox_prefix/init.d

%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: The Mozilla Firefox development files
Group: Development/Other

%description devel
The 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 .run-scripts
%patch3 -p1 -b .nox
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p0
%patch11 -p0
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1

%patch20 -p1
%patch21 -p1
%patch22 -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
cd -

%build
for d in build/autoconf \
nsprpub/build/autoconf \
directory/c-sdk/config/autoconf
do
   install -m755 %_datadir/automake/config.{guess,sub} $d
done

%set_autoconf_version 2.13
%__autoconf

%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 '%firefox_prefix' |tr '[:print:]' '_')"
export LDFLAGS="$LDFLAGS -Wl,-rpath,$rpath"

%configure \
--disable-ldap \
--disable-mailnews \
--enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,gnomevfs,negotiateauth \
--enable-crypto \
--enable-nspr-autoconf \
--without-system-nspr \
--disable-composer \
--enable-single-profile \
--disable-profilesharing \
--prefix=%_prefix \
--includedir=%_includedir/%name \
--disable-tests \
--disable-freetype2 \
--enable-xft \
--enable-necko-protocols=all \
--enable-default-toolkit=gtk2 \
--enable-reorder \
--enable-shared \
%ifnarch x86_64
--enable-elf-dynstr-gc \
%endif # x86_64
%if_with debug
--disable-strip \
--enable-debug \
--enable-debug-modules \
--enable-logrefcnt \
--enable-debugger-info-modules \
--enable-detect-webshell-leaks \
%else
--enable-strip \
--enable-strip-libs \
--disable-debug \
%endif # debug
%if_with svg
--enable-svg \
  --enable-svg-renderer-cairo \
%endif # svg
%if_with xprint
--enable-xprint \
%else
--disable-xprint \
%endif # xprint
%if_with branding
--enable-official-branding \
%endif
--with-system-jpeg \
--with-system-png \
--with-system-zlib \
--with-pthreads \
--disable-installer \
#

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

%install
%__mkdir_p \
   %buildroot/%firefox_prefix/install \
   %buildroot/%firefox_extensionsdir \
   %buildroot/%_datadir/%fullname/scripts

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

%__rm -rf %buildroot/%firefox_prefix/install

# update plugins

subst 's,%%PLUGIN_PATH%%,%browser_plugins_path,' %buildroot/%_bindir/%name

# 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 -D -m 644 %SOURCE10 %buildroot/%_datadir/applications/%name.desktop

%__mkdir_p %buildroot/%_menudir
%Md2m \
%name \
"Networking/WWW" \
%buildroot/%_datadir/applications/%name.desktop \
%buildroot/%_menudir/%name \
x11

# 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

%__install -D -m 644 %SOURCE4 %buildroot%_sysconfdir/rpm/macros.d/%name

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

# Install firsttime script.

%__install -D -m 755 %SOURCE11                                  %buildroot/%_sysconfdir/firsttime.d/%name-%version
%__subst 's, at firefox_bin at ,%_bindir/%name,g'                     %buildroot/%_sysconfdir/firsttime.d/%name-%version
%__subst 's, at firefox_run at ,%firefox_run,g'                       %buildroot/%_sysconfdir/firsttime.d/%name-%version
%__subst 's, at firefox_scriptdir at ,%_datadir/%fullname/scripts,g'  %buildroot/%_sysconfdir/firsttime.d/%name-%version
%__subst 's, at firefox_extensionsdir at ,%firefox_extensionsdir,g'   %buildroot/%_sysconfdir/firsttime.d/%name-%version

# Install script to switch language after language packs installation.

%__install -D -m 755 %SOURCE12                                  %buildroot/%firefox_initd/S10firefox.common.langs.sh
%__subst 's, at firefox_extensionsdir at ,%firefox_extensionsdir,g'   %buildroot/%firefox_initd/S10firefox.common.langs.sh

# ALT-specific

%__install -D -m 755 %SOURCE13                                  %buildroot/%firefox_initd/S000userhome.sh

# move Firefox stuff

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

# 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

rpath="/$(printf %%s '%firefox_prefix' |tr '[:print:]' '_')"
find "%buildroot/%firefox_prefix" -type f |
while read f; do
 %__file "$f" | grep -qs ELF || continue
 if chrpath -l "$f" | fgrep -qs "RPATH=$rpath"; then
 chrpath -r "%firefox_prefix" "$f"
 fi
done

%triggerpostun -n %name -- %name > %version
[ ! -d "%firefox_prefix/extensions" ] || %__rm -rf "%firefox_prefix/extensions"
[ ! -d "%firefox_prefix/chrome/overlayinfo" ] || %__rm -rf "%firefox_prefix/chrome/overlayinfo"
%__rm -f %firefox_prefix/chrome/*.rdf
%__rm -f %firefox_prefix/component.reg
%__rm -f %firefox_prefix/defaults.ini
%__rm -f %firefox_prefix/components.ini
%__rm -f %firefox_prefix/components/*.dat

%triggerin -n %name -- %name < 1.0.5
printf '\n\nWARNING! WARNING! WARNING!\nPlease make reinstall all your Firefox extentions after version change or Firefox upgrade.\n\n'

%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"
   %__rm -f %firefox_prefix/chrome/*.rdf
   %__rm -f %firefox_prefix/component.reg
   %__rm -f %firefox_prefix/defaults.ini
   %__rm -f %firefox_prefix/components.ini
   %__rm -f %firefox_prefix/components/*.dat
fi

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

%postun
%clean_menus

%files
%_bindir/%name
%_sysconfdir/firsttime.d/%name-%version
%_libdir/%name
%firefox_prefix
%_datadir/%name
%_datadir/%fullname
%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 можно просмотреть здесь

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