Репозиторий Sisyphus
Последнее обновление: 18 ноября 2018 | Пакетов: 18666 | Посещений: 12568409
en ru br
Репозитории ALT
S:63.0.1-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 

%set_verify_elf_method relaxed

%define firefox_cid     \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
%define firefox_prefix  %_libdir/firefox
%define firefox_datadir %_datadir/firefox

%define gst_version 1.0
%define nspr_version 4.17
%define nss_version 3.33.0

#global gcc_version 5

#set_gcc_version #gcc_version

Summary:              The Mozilla Firefox project is a redesign of Mozilla's browser
Summary(ru_RU.UTF-8): п≤п╫я┌п╣я─п╫п╣я┌-п╠я─п╟я┐п╥п╣я─ Mozilla Firefox

Name:           firefox
Version:        58.0.2
Release:        alt2
License:        MPL/GPL/LGPL
Group:          Networking/WWW
URL:            http://www.mozilla.org/projects/firefox/

Packager:       Alexey Gladkov <legion at altlinux.ru>

Source0:        firefox-source.tar
Source1:        rpm-build.tar
Source2:        searchplugins.tar
Source4:        firefox-mozconfig
Source5:        distribution.ini
Source6:        firefox.desktop
Source7:        firefox.c
Source8:        firefox-prefs.js

Patch6:         firefox-alt-disable-werror.patch
Patch7:         firefox-alt-fix-expandlibs.patch
Patch8:         firefox-alt-fix-fortify-source-check.patch
Patch14:        firefox-fix-install.patch
Patch16:        firefox-cross-desktop.patch
Patch17:        firefox-mediasource-crash.patch
Patch18:        firefox-alt-nspr-for-rust.patch

# Upstream

Patch200:       mozilla-bug-256180.patch
Patch201:       mozilla-bug-1196777.patch

BuildRequires(pre): mozilla-common-devel
BuildRequires(pre): rpm-build-mozilla.org
BuildRequires(pre): browser-plugins-npapi-devel

BuildRequires: gcc-c++
BuildRequires: clang4.0 clang4.0-devel llvm4.0 llvm4.0-libs llvm4.0-devel
BuildRequires: rpm-macros-alternatives
BuildRequires: rust rust-cargo
BuildRequires: libXt-devel libX11-devel libXext-devel libXft-devel libXScrnSaver-devel
BuildRequires: libXcomposite-devel
BuildRequires: libXdamage-devel
BuildRequires: libcurl-devel libgtk+2-devel libgtk+3-devel libhunspell-devel libjpeg-devel
BuildRequires: xorg-cf-files chrpath alternatives yasm
BuildRequires: zip unzip
BuildRequires: bzlib-devel zlib-devel
BuildRequires: libcairo-devel libpixman-devel
BuildRequires: libGL-devel
BuildRequires: libwireless-devel
BuildRequires: libalsa-devel
BuildRequires: libnotify-devel
BuildRequires: libevent-devel
BuildRequires: libproxy-devel
BuildRequires: libshell
BuildRequires: libvpx-devel
BuildRequires: libgio-devel
BuildRequires: libfreetype-devel fontconfig-devel
BuildRequires: libstartup-notification-devel
BuildRequires: libffi-devel
BuildRequires: gstreamer%gst_version-devel gst-plugins%gst_version-devel
BuildRequires: libopus-devel
BuildRequires: libpulseaudio-devel
#BuildRequires: libicu-devel
BuildRequires: libdbus-devel libdbus-glib-devel

# Python requires

BuildRequires: /dev/shm
BuildRequires: python-module-distribute
BuildRequires: python-module-pip
BuildRequires: python-modules-compiler
BuildRequires: python-modules-logging
BuildRequires: python-modules-sqlite3
BuildRequires: python-modules-json

# Rust requires

BuildRequires: /proc

# Mozilla requires

BuildRequires: pkgconfig(nspr) >= %nspr_version
BuildRequires: pkgconfig(nss) >= %nss_version
BuildRequires: libnss-devel-static

BuildRequires: autoconf_2.13
%set_autoconf_version 2.13

Obsoletes: firefox-3.6 firefox-4.0 firefox-5.0
Conflicts: firefox-settings-desktop

Provides: webclient
Requires: mozilla-common

# ALT#30732

Requires: gst-plugins-ugly%gst_version

# Protection against fraudulent DigiNotar certificates

Requires: libnss >= 3.12.11-alt3

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

%description -l ru_RU.UTF8
п≤п╫я┌п╣я─п╫п╣я┌-п╠я─п╟я┐п╥п╣я─ Mozilla Firefox - п╨я─п╬я│я│п©п╩п╟я┌я└п╬я─п╪п╣п╫п╫п╟я▐ п╪п╬п╢п╦я└п╦п╨п╟я├п╦я▐ п╠я─п╟я┐п╥п╣я─п╟ Mozilla,
я│п╬п╥п╢п╟п╫п╫п╟я▐ я│ п╦я│п©п╬п╩я▄п╥п╬п╡п╟п╫п╦п╣п╪ я▐п╥я▀п╨п╟ XUL п╢п╩я▐ п╬п©п╦я│п╟п╫п╦я▐ п╦п╫я┌п╣я─я└п╣п╧я│п╟ п©п╬п╩я▄п╥п╬п╡п╟я┌п╣п╩я▐.

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

Requires: mozilla-common-devel
Requires: rpm-build-mozilla.org

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

%prep
%setup -q -n firefox-%version -c
cd mozilla

tar -xf %SOURCE1
tar -xf %SOURCE2

#patch6  -p1

%patch7  -p2
%patch8  -p2
%patch14 -p1
%patch16 -p2
%patch17 -p2
%patch18 -p2

%patch200 -p1
%patch201 -p1

cp -f %SOURCE4 .mozconfig

%ifnarch %{ix86} x86_64 armh
echo "ac_add_options --disable-methodjit" >> .mozconfig
echo "ac_add_options --disable-monoic" >> .mozconfig
echo "ac_add_options --disable-polyic" >> .mozconfig
echo "ac_add_options --disable-tracejit" >> .mozconfig
%endif

%build
cd mozilla

%add_optflags %optflags_shared
%add_findprov_lib_path %firefox_prefix

export MOZ_BUILD_APP=browser

MOZ_OPT_FLAGS="$RPM_OPT_FLAGS"

# PIE, full relro

MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -Wl,-z,relro -Wl,-z,now"

# Add fake RPATH

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

# add -fno-delete-null-pointer-checks and -fno-inline-small-functions for gcc6

MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fno-delete-null-pointer-checks -fno-inline-small-functions"

# Mozilla builds with -Wall with exception of a few warnings which show up

# everywhere in the code; so, don't override that.
MOZ_OPT_FLAGS=$(echo $MOZ_OPT_FLAGS | sed -e 's/-Wall//')

# Disable C++ exceptions since Mozilla code is not exception-safe

MOZ_OPT_FLAGS=$(echo $MOZ_OPT_FLAGS | sed -e 's/-fexceptions/-fno-exceptions/g')

# If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which

# overrides the -g0 from line above and breaks building on s390
# (OOM when linking, rhbz#1238225)
MOZ_OPT_FLAGS="$(echo $MOZ_OPT_FLAGS | sed -e 's/ -g/ -g0/')"
export MOZ_DEBUG_FLAGS=" "

export CFLAGS="$MOZ_OPT_FLAGS"
export CXXFLAGS="$MOZ_OPT_FLAGS"

export LIBIDL_CONFIG=/usr/bin/libIDL-config-2
export srcdir="$PWD"
export SHELL=/bin/sh
export RUST_BACKTRACE=1
export RUSTFLAGS="-Cdebuginfo=0"
export BUILD_VERBOSE_LOG=1
export GCC_USE_GNU_LD=1

cat >> .mozconfig <<'EOF'
ac_add_options --prefix="%_prefix"
ac_add_options --libdir="%_libdir"
EOF

#export CC="clang"

#export CXX="clang++"

# On x86 architectures, Mozilla can build up to 4 jobs at once in parallel,

# however builds tend to fail on other arches when building in parallel.
MOZ_SMP_FLAGS=-j1
%ifarch %{ix86} x86_64
[ "${NPROCS:-0}" -ge 2 ] && MOZ_SMP_FLAGS=-j2
[ "${NPROCS:-0}" -ge 4 ] && MOZ_SMP_FLAGS=-j4
[ "${NPROCS:-0}" -ge 8 ] && MOZ_SMP_FLAGS=-j8
%endif

export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS"

%__autoconf old-configure.in > old-configure
pushd js/src
%__autoconf old-configure.in > old-configure
popd

./mach build

%__cc %optflags \
-Wall -Wextra \
-DMOZ_PLUGIN_PATH=\"%browser_plugins_path\" \
-DMOZ_PROGRAM=\"%firefox_prefix/firefox\" \
-DMOZ_DIST_BIN=\"%firefox_prefix\"\
%SOURCE7 -o firefox


%install
cd mozilla

export SHELL=/bin/sh

%__mkdir_p \
%buildroot/%mozilla_arch_extdir/%firefox_cid \
%buildroot/%mozilla_noarch_extdir/%firefox_cid \
#

make -C objdir \
DESTDIR=%buildroot \
INSTALL="/bin/install -p" \
mozappdir=%firefox_prefix \
libdir=%_libdir \
install

# install altlinux-specific configuration

install -D -m 644 %SOURCE8 %buildroot/%firefox_prefix/browser/defaults/preferences/all-altlinux.js

cat > %buildroot/%firefox_prefix/browser/defaults/preferences/firefox-l10n.js <<EOF
pref("intl.locale.matchOS", true);
pref("general.useragent.locale", "chrome://global/locale/intl.properties");
EOF

# icons

for s in 16 22 24 32 48 256; do
install -D -m 644 \
browser/branding/official/default$s.png \
%buildroot/%_iconsdir/hicolor/${s}x${s}/apps/firefox.png
done

# ALT#30572

if [ ! -e "%buildroot/%firefox_prefix/plugins" ]; then
what="$(relative %browser_plugins_path %firefox_prefix/plugins)"
ln -s -- "$what" %buildroot/%firefox_prefix/plugins
fi

# install rpm-build-firefox

mkdir -p -- \
%buildroot/%_rpmmacrosdir
sed \
-e 's, at firefox_version at ,%version,' \
-e 's, at firefox_release at ,%release,' \
rpm-build/rpm.macros.firefox.standalone > %buildroot/%_rpmmacrosdir/firefox

install -m755 firefox %buildroot/%_bindir/firefox

cd %buildroot

# Add distribution.ini

mkdir -p -- ./%firefox_prefix/distribution
cp -- %SOURCE5 ./%firefox_prefix/distribution/distribution.ini

# install menu file

%__install -D -m 644 %SOURCE6 ./%_datadir/applications/firefox.desktop

# Add alternatives

mkdir -p ./%_altdir
printf '%_bindir/xbrowser\t%_bindir/firefox\t100\n' >./%_altdir/firefox

rm -f -- \
./%firefox_prefix/removed-files

# Remove devel files

rm -rf -- \
./%_includedir/%name \
./%_datadir/idl/%name \
./%_libdir/%name-devel \
#

# Add real RPATH

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

%pre
for n in defaults browserconfig.properties; do
[ ! -L "%firefox_prefix/$n" ] || rm -f "%firefox_prefix/$n"
done

%files
%_altdir/firefox
%_bindir/firefox
%firefox_prefix
%mozilla_arch_extdir/%firefox_cid
%mozilla_noarch_extdir/%firefox_cid
%_datadir/applications/firefox.desktop
%_iconsdir/hicolor/16x16/apps/firefox.png
%_iconsdir/hicolor/22x22/apps/firefox.png
%_iconsdir/hicolor/24x24/apps/firefox.png
%_iconsdir/hicolor/32x32/apps/firefox.png
%_iconsdir/hicolor/48x48/apps/firefox.png
%_iconsdir/hicolor/256x256/apps/firefox.png

%files -n rpm-build-firefox
%_rpmmacrosdir/firefox

%changelog

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

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