### Naming ### # Set to true if it's going to be submitted as update %global release_build 1 # Set new source-code build version # This tag indicates a new rebuild for Fedora %global redhat_ver rh1 # Exclude ARM for the following error: # terminate called after throwing an instance of 'std::bad_alloc' # what(): std::bad_alloc # error: could not compile `gkrust` ExcludeArch: %{arm} # Build is failing because of # include/mozilla/FloatingPoint.h:212:31: error: inlining failed in call to ‘always_inline’ ‘bool mozilla::IsNegativeZero(T) [with T = double]’: indirect function call with a yet undetermined callee %if 0%{?fedora} > 37 ExcludeArch: s390x %endif #################### ### Optimization ### # Builds for debugging %global debug_build 1 # Downgrade optimization %global less_optbuild 0 # Use mozilla hardening option? %global hardened_build 1 #################### # Build PGO+LTO on x86_64 and aarch64 only due to build issues # on other arches. %ifarch x86_64 %if 0%{?release_build} %global build_with_pgo 0 %global pgo_wayland 0 %else %global build_with_pgo 0 %endif %endif %global launch_wayland_compositor 0 %if 0%{?build_with_pgo} %global launch_wayland_compositor 1 %endif # Disable LTO to work around rhbz#1883904 %define _lto_cflags %{nil} #################### # Active/Deactive language files handling %global build_langpacks 1 %global default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html # Define installation directories %global icecatappdir %{_libdir}/%{name} %global icecat_ver %{name}-%{version} %global icecat_devel %{name}-devel-%{version} # Define language files directory %global langpackdir %{icecatappdir}/langpacks %global toolkit_gtk3 1 # Big endian platforms %ifarch ppc64 s390x # Javascript Intl API is not supported on big endian platforms right now: # https://bugzilla.mozilla.org/show_bug.cgi?id=1322212 %global big_endian 1 %endif %global system_nss 1 %if %{?system_nss} %global nspr_version 4.32 %global nspr_build_version %{nspr_version} %global nss_version 3.80 %global nss_build_version %{nss_version} %endif # Audio backends %bcond_without pulseaudio %bcond_with alsa %global with_vpx 1 %if %{?with_vpx} %global libvpx_version 1.8.2 %endif %global disable_elfhack 1 # cbingen %global use_bundled_cbindgen 1 # Use clang? %global build_with_clang 0 # https://bugzilla.redhat.com/show_bug.cgi?id=1908792 %global __provides_exclude_from ^%{icecatappdir} %global __requires_exclude_from ^%{icecatappdir} Name: icecat Epoch: 1 Version: 102.10.0 Release: %autorelease -e %{redhat_ver} Summary: GNU version of Firefox browser # Tri-licensing scheme for Gnuzilla/IceCat in parentheses, and licenses for the extensions included License: (MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later) and GPL-3.0-or-later and MIT and BSD and ISC and Apache-2.0 and MPL-2.0 URL: http://www.gnu.org/software/gnuzilla/ ## Source archive created by scripts based on Gnuzilla files. ## Modified files are hosted in a dedicated fork repository: ## https://gitlab.com/anto.trande/icecat Source0: %{name}-%{version}-%{redhat_ver}.tar.bz2 Source2: %{name}.png Source3: %{name}-mozconfig-common # Language files downloaded by source7 script %if 0%{?build_langpacks} Source4: %{name}-%{version}-langpacks.tar.gz %endif # All license files # Download from http://www.gnu.org/licenses # Download from http://www.mozilla.org/MPL/1.1/index.txt # Download from https://www.mozilla.org/MPL/2.0/index.txt Source5: %{name}-COPYING-licensefiles.tar.gz Source7: %{name}-lang_download.sh # Desktop files Source9: %{name}-wayland.desktop Source10: %{name}.appdata.xml Source12: %{name}-wayland.sh.in Source13: %{name}.sh.in Source14: %{name}.desktop Source15: %{name}-x11.sh.in Source16: %{name}-x11.desktop # cbingen Source17: cbindgen-vendor.tar.xz Source18: node-stdout-nonblocking-wrapper Source19: run-wayland-compositor # Build patches # Fixes installation of those addons which don't have ID on IceCat ("Cannot find id for addon" error). Patch1: %{name}-fix_addon_installation.patch Patch2: %{name}-commasplit.patch Patch3: mozilla-build-arm.patch Patch4: %{name}-build-arm-libaom.patch Patch5: rhbz-1219542-s390-build.patch # If cbindgen=0.24 Patch6: mozilla-1773336.patch Patch40: build-aarch64-skia.patch Patch41: build-disable-elfhack.patch Patch44: build-arm-libopus.patch Patch54: mozilla-1669639.patch # Fedora specific patches Patch219: rhbz-1173156.patch Patch220: firefox-nss-version.patch Patch221: firefox-nss-addon-hack.patch Patch223: %{name}-glibc-dynstack.patch Patch224: %{name}-GLIBCXX-fix-for-GCC-12.patch Patch225: %{name}-102.7.0-fix_gcc13_build.patch # ARM run-time patch Patch226: rhbz-1354671.patch # Upstream patches Patch401: icecat-1742849.patch Patch402: mozilla-1196777.patch Patch403: icecat-python3.11-open-U.patch Patch404: icecat-python3.11-regex-inline-flags.patch Patch412: mozilla-1337988.patch Patch422: mozilla-1580174-webrtc-popup.patch # Fix crash on ppc64le (mozilla#1512162) Patch423: mozilla-1512162.patch # PGO/LTO patches Patch600: %{name}-pgo.patch Patch602: mozilla-1516803.patch #VA-API patches Patch584: firefox-disable-ffvpx-with-vapi.patch Patch585: firefox-vaapi-extra-frames.patch BuildRequires: alsa-lib-devel BuildRequires: autoconf213 BuildRequires: bzip2-devel BuildRequires: cairo-devel BuildRequires: cargo %if !0%{?use_bundled_cbindgen} BuildRequires: cbindgen %endif BuildRequires: ccache BuildRequires: dbus-devel BuildRequires: dbus-glib-devel BuildRequires: dbus-x11 BuildRequires: dconf BuildRequires: desktop-file-utils BuildRequires: dos2unix BuildRequires: gcc, gcc-c++ BuildRequires: make BuildRequires: fedora-bookmarks BuildRequires: freetype-devel BuildRequires: gdk-pixbuf2 BuildRequires: glib2-devel BuildRequires: pkgconfig(gtk+-2.0) %if 0%{?toolkit_gtk3} BuildRequires: pkgconfig(gtk+-3.0) %endif BuildRequires: gstreamer1-devel BuildRequires: gstreamer1-plugins-base-devel BuildRequires: hunspell-devel BuildRequires: ImageMagick, autotrace BuildRequires: intltool BuildRequires: libappstream-glib BuildRequires: libavcodec-free-devel BuildRequires: libevent-devel BuildRequires: libjpeg-turbo-devel BuildRequires: libjpeg-devel BuildRequires: libX11-devel BuildRequires: libXt-devel BuildRequires: libXrender-devel BuildRequires: libyuv-devel BuildRequires: libXinerama-devel BuildRequires: libffi-devel BuildRequires: libnotify-devel BuildRequires: libpng-devel %if %{?with_vpx} BuildRequires: libvpx-devel >= %{libvpx_version} %endif BuildRequires: libzip-devel BuildRequires: mesa-libGL-devel BuildRequires: nodejs BuildRequires: nasm >= 1.13 BuildRequires: strace %if %{?system_nss} BuildRequires: pkgconfig(nspr) >= %{nspr_version} BuildRequires: pkgconfig(nss) >= %{nss_version} BuildRequires: nss-static >= %{nss_version} %endif BuildRequires: pango-devel BuildRequires: pipewire-devel BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: perl-interpreter BuildRequires: pkgconfig(xrender) BuildRequires: pkgconfig(libstartup-notification-1.0) BuildRequires: pkgconfig(dri) BuildRequires: pkgconfig(libcurl) %if %{with pulseaudio} BuildRequires: pulseaudio-libs-devel %endif BuildRequires: yasm BuildRequires: llvm BuildRequires: llvm-devel BuildRequires: clang BuildRequires: clang-libs BuildRequires: clang-devel %if 0%{?build_with_clang} BuildRequires: lld %endif BuildRequires: rust %if 0%{?pgo_wayland} BuildRequires: mutter BuildRequires: gsettings-desktop-schemas BuildRequires: gnome-settings-daemon BuildRequires: mesa-dri-drivers BuildRequires: xorg-x11-server-Xwayland %endif %if 0%{?build_with_pgo} BuildRequires: xorg-x11-server-Xvfb %endif %if 0%{?big_endian} BuildRequires: icu %endif Requires: dconf Requires: mozilla-filesystem Requires: p11-kit-trust %if %{?system_nss} Requires: nspr >= %{nspr_build_version} Requires: nss >= %{nss_build_version} %endif Requires: fedora-bookmarks Suggests: mozilla-ublock-origin Provides: webclient Provides: bundled(mozilla-https-everywhere) = 2022.5.11 %description GNU IceCat is the GNU version of the Firefox ESR browser. Extensions included to this version of IceCat: * LibreJS GNU LibreJS aims to address the JavaScript problem described in the article "The JavaScript Trap" of Richard Stallman. * HTTPS Everywhere HTTPS Everywhere is an extension that encrypts your communications with many major websites, making your browsing more secure. * A set of companion extensions for LibreJS by Nathan Nichols are pre-installed, and provide workarounds to use some services at USPS, RSF.org, SumOfUs.org, pay.gov, McDonalds, goteo.org and Google Docs without using nonfree JavaScript. * A series of configuration changes and tweaks were applied to ensure that IceCat does not initiate network connections that the user has not explicitly requested. This implies not downloading feeds, updates, blacklists or any other similar data needed during startup. %package x11 Summary: GNU IceCat X11 launcher Requires: %{name}%{?_isa} %description x11 The %{name}-x11 package contains launcher and desktop file to run GNU IceCat native on X11. %package wayland Summary: GNU IceCat Wayland launcher Requires: %{name}%{?_isa} Obsoletes: %{name} < 0:78.6.1-1 %description wayland The icecat-wayland package contains launcher and desktop file to run GNU IceCat native on Wayland. %prep %autosetup -N -n %{name}-%{version} # Fix permissions #find . -type f -name "*.h" -exec chmod 0644 '{}' \; #find . -type f -name "*.cpp" -exec chmod 0644 '{}' \; #find . -type f -name "*.cc" -exec chmod 0644 '{}' \; #find . -type f -name "*.c" -exec chmod 0644 '{}' \; # Copy license files tar -xf %{SOURCE5} %patch 1 -p 1 -b .fix_addon_installation %patch 2 -p 1 -b .commasplit %patch 3 -p 1 -b .build-arm-libaom %patch 4 -p 1 -b .arm %ifarch s390 %patch 5 -p 1 -b .rhbz-1219542-s390 %endif %patch 6 -p 1 -b .1773336 %if 0%{?disable_elfhack} %patch 41 -p 1 -b .disable-elfhack %endif # Fedora patches %patch 219 -p 1 -b .rhbz-1173156 %patch 221 -p 1 -b .firefox-nss-addon-hack %patch 224 -p 1 -b .glibcxx %patch 225 -p 1 -b .gcc13 # ARM run-time patch %ifarch aarch64 %patch 40 -p 1 -b .aarch64-skia %patch 226 -p 1 -b .1354671 %endif %ifarch %{arm} %patch 44 -p 1 -b .build-arm-libopus %endif %patch 402 -p 1 -b .1196777 %ifarch %{power64} %patch 423 -p 1 -b .1512162 %endif #%%patch 584 -p1 -b .firefox-disable-ffvpx-with-vapi #%%patch 585 -p1 -b .firefox-vaapi-extra-frames %patch 54 -p 1 -b .1669639 # PGO patches %if 0%{?build_with_pgo} %if !%{build_with_clang} %patch 600 -p 1 -b .pgo %patch 602 -p 1 -b .1516803 %endif %endif # Remove default configuration and copy the customized one rm -f .mozconfig cp -p %{SOURCE3} .mozconfig # Disable signature checking for extensions that are bundled with IceCat. # Add these options to allow loading unsigned add-ons in app and system scopes. echo "ac_add_options --with-unsigned-addon-scopes=app,system" >> .mozconfig echo "ac_add_options --allow-addon-sideload" >> .mozconfig echo "ac_add_options --enable-default-toolkit=cairo-gtk3-wayland" >> .mozconfig echo "ac_add_options --enable-official-branding" >> .mozconfig echo "ac_add_options --disable-webrtc" >> .mozconfig # Hide DRM Content option # This option does not work on other architectures %ifarch x86_64 %{ix86} echo "ac_add_options --disable-eme" >> .mozconfig %endif %if %{with pulseaudio} echo "ac_add_options --enable-pulseaudio" >> .mozconfig %endif %if %{with alsa} echo "ac_add_options --enable-alsa" >> .mozconfig %endif %ifarch s390x echo "ac_add_options --disable-jemalloc" >> .mozconfig %endif %if %{?system_nss} echo "ac_add_options --with-system-nspr" >> .mozconfig echo "ac_add_options --with-system-nss" >> .mozconfig echo 'ac_add_options BINDGEN_CFLAGS="%(pkg-config nspr pixman-1 --cflags)"' >> .mozconfig %else echo "ac_add_options --without-system-nspr" >> .mozconfig echo "ac_add_options --without-system-nss" >> .mozconfig %endif # Workaround for mozbz#1341234 echo "ac_add_options --allow-addon-sideload" >> .mozconfig echo "ac_add_options --enable-system-pixman" >> .mozconfig echo "ac_add_options --with-system-libevent" >> .mozconfig %if %{?with_vpx} echo "ac_add_options --with-system-libvpx" >> .mozconfig %else echo "ac_add_options --without-system-libvpx" >> .mozconfig %endif echo "ac_add_options --with-system-jpeg" >> .mozconfig echo "ac_add_options --enable-ffmpeg" >> .mozconfig # This option works on these architectures only %ifarch %{arm} echo "ac_add_options --disable-elf-hack" >> .mozconfig echo "ac_add_options --disable-av1" >> .mozconfig echo 'export NEON_FLAGS=-mfpu=vfpv3-d16' >> .mozconfig %endif %ifnarch %{arm} echo "ac_add_options --enable-av1" >> .mozconfig %endif %if 0%{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig echo "ac_add_options --enable-rust-debug" >> .mozconfig %else %global optimize_flags "none" %ifarch %{arm} s390x # ARMv7 need that (rhbz#1426850) %define optimize_flags " -fno-schedule-insns" %endif %if %{?optimize_flags} != "none" echo 'ac_add_options --enable-optimize=%{?optimize_flags}' >> .mozconfig %else echo 'ac_add_options --enable-optimize' >> .mozconfig %endif echo "ac_add_options --disable-debug" >> .mozconfig %endif echo "ac_add_options --disable-strip" >> .mozconfig echo "ac_add_options --disable-install-strip" >> .mozconfig echo "ac_add_options --disable-tests" >> .mozconfig echo "ac_add_options --disable-crashreporter" >> .mozconfig # Localization %if 0%{?build_langpacks} echo "ac_add_options --with-l10n-base=$PWD/l10n" >> .mozconfig %endif %ifarch s390x echo "ac_add_options --disable-jit" >> .mozconfig %endif %if 0%{?build_with_pgo} echo "ac_add_options MOZ_PGO=1" >> .mozconfig echo "ac_add_options --enable-lto" >> .mozconfig %else echo "ac_add_options --disable-lto" >> .mozconfig %endif echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' >> .mozconfig # Remove executable bit to make brp-mangle-shebangs happy. chmod -x third_party/rust/itertools/src/lib.rs chmod a-x third_party/rust/ash/src/extensions/ext/*.rs chmod a-x third_party/rust/ash/src/extensions/khr/*.rs chmod a-x third_party/rust/ash/src/extensions/nv/*.rs # Remove unrecognized files find extensions/gnu -name cose.manifest -delete #--------------------------------------------------------------------- %build # cbindgen %if 0%{?use_bundled_cbindgen} mkdir -p my_rust_vendor cd my_rust_vendor %{__tar} xf %{SOURCE17} cd - mkdir -p .cargo cat > .cargo/config <> .mozconfig %endif %endif %ifarch %{arm} %{ix86} s390x export RUSTFLAGS="-Cdebuginfo=0" %else # Otherwise since https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/243 breaks build. unset RUSTFLAGS %endif export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' export LIBDIR='%{_libdir}' export PKG_CONFIG='%{_bindir}/pkg-config' export PYTHON='%{__python3}' %if 0%{?build_with_clang} export LLVM_PROFDATA="llvm-profdata" export AR="llvm-ar" export NM="llvm-nm" export RANLIB="llvm-ranlib" echo "ac_add_options --enable-linker=lld" >> .mozconfig %else export CC=gcc export CXX=g++ export AR="gcc-ar" export NM="gcc-nm" export RANLIB="gcc-ranlib" %endif export CCACHE_DISABLE=1 %if %{?less_optbuild} MOZ_SMP_FLAGS=-j1 %else MOZ_SMP_FLAGS=-j1 # On x86_64 architectures, Mozilla can build up to 4 jobs at once in parallel, # however builds tend to fail on other arches when building in parallel. %ifarch %{ix86} s390x %{arm} aarch64 [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 %endif %ifarch x86_64 ppc ppc64 ppc64le [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 [ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 [ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 [ "$RPM_BUILD_NCPUS" -ge 16 ] && MOZ_SMP_FLAGS=-j16 [ "$RPM_BUILD_NCPUS" -ge 24 ] && MOZ_SMP_FLAGS=-j24 [ "$RPM_BUILD_NCPUS" -ge 32 ] && MOZ_SMP_FLAGS=-j32 [ "$RPM_BUILD_NCPUS" -ge 64 ] && MOZ_SMP_FLAGS=-j64 %endif %endif echo "mk_add_options MOZ_MAKE_FLAGS=\"$MOZ_SMP_FLAGS\"" >> .mozconfig echo "mk_add_options MOZ_SERVICES_SYNC=1" >> .mozconfig echo "export STRIP=/bin/true" >> .mozconfig %if 0%{?launch_wayland_compositor} cp -p %{SOURCE19} . . ./run-wayland-compositor %endif %if %{?debug_build} export CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true %endif #export MACH_USE_SYSTEM_PYTHON=1 %if 0%{?build_with_pgo} %if 0%{?pgo_wayland} env | grep "WAYLAND" MOZ_ENABLE_WAYLAND=1 ./mach build -v 2>&1 | cat - && exit 1 %else xvfb-run ./mach build 2>&1 | cat - || exit 1 %endif %else ./mach build -v 2>&1 | cat - || exit 1 %endif %install # set up our default bookmarks cp -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html %make_install -C objdir ##Resize IceCat icon for i in 16 22 24 32 36 48 64 72 96 128 256 ; do mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps convert -geometry ${i} %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png done ##desktop file installation mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE14} rm -rf %{buildroot}%{_bindir}/%{name} %{__sed} -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE13} > %{buildroot}%{_bindir}/%{name} chmod 755 %{buildroot}%{_bindir}/%{name} %{__sed} -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE15} > %{buildroot}%{_bindir}/%{name}-x11 chmod 755 %{buildroot}%{_bindir}/%{name}-x11 desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE16} %{__sed} -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE12} > %{buildroot}%{_bindir}/%{name}-wayland chmod 755 %{buildroot}%{_bindir}/%{name}-wayland desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE9} # ##Install man page mkdir -p %{buildroot}%{_mandir}/man1 install -p -m 644 %{name}.1 %{buildroot}%{_mandir}/man1/ ##Extract langpacks, make any mods needed, repack the langpack, and install it. %if 0%{?build_langpacks} echo > %{name}.lang mkdir -p %{buildroot}%{langpackdir} tar xf %{SOURCE4} for langpack in `ls langpacks/*.xpi`; do language=`basename $langpack .xpi` extensionID=langpack-$language@icecat.mozilla.org mkdir -p $extensionID unzip -qq $langpack -d $extensionID find $extensionID -type f | xargs chmod 644 cd $extensionID zip -qq -r9mX ../${extensionID}.xpi * cd - install -p -m 644 ${extensionID}.xpi %{buildroot}%{langpackdir} language=`echo $language | sed -e 's/-/_/g'` echo "%%lang($language) %{langpackdir}/${extensionID}.xpi" >> %{name}.lang done rm -rf %{name}-langpacks ##Install langpack workaround (see #707100, #821169) function create_default_langpack() { language_long=$1 language_short=$2 cd %{buildroot}%{langpackdir} ln -s langpack-$language_long@icecat.mozilla.org.xpi langpack-$language_short@icecat.mozilla.org.xpi cd - echo "%%lang($language_short) %{langpackdir}/langpack-$language_short@icecat.mozilla.org.xpi" >> %{name}.lang } # Table of fallbacks for each language #create_default_langpack "bn-IN" "bn" create_default_langpack "es-AR" "es" create_default_langpack "fy-NL" "fy" create_default_langpack "ga-IE" "ga" create_default_langpack "gu-IN" "gu" create_default_langpack "hi-IN" "hi" create_default_langpack "hy-AM" "hy" create_default_langpack "nb-NO" "nb" create_default_langpack "nn-NO" "nn" create_default_langpack "pa-IN" "pa" create_default_langpack "pt-PT" "pt" create_default_langpack "sv-SE" "sv" create_default_langpack "zh-TW" "zh" %endif # Remove copied libraries to speed up build rm -f ${RPM_BUILD_ROOT}%{_libdir}/%{icecat_devel}/sdk/lib/libmozjs.so rm -f ${RPM_BUILD_ROOT}%{_libdir}/%{icecat_devel}/sdk/lib/libmozalloc.so rm -f ${RPM_BUILD_ROOT}%{_libdir}/%{icecat_devel}/sdk/lib/libxul.so # Remove useless backup files rm -rf ${RPM_BUILD_ROOT}%{icecatappdir}/browser/extensions/SimpleSumOfUs@0xbeef.coffee # Link identical binaries ln -sf %{icecatappdir}/%{name}-bin ${RPM_BUILD_ROOT}%{icecatappdir}/%{name} # Use the system hunspell dictionaries rm -rf ${RPM_BUILD_ROOT}%{icecatappdir}/dictionaries ln -s %{_datadir}/hunspell ${RPM_BUILD_ROOT}%{icecatappdir}/dictionaries # Copy over run-icecat.sh cp -p build/unix/run-%{name}.sh %{buildroot}%{icecatappdir}/ # Remove unused directories rm -rf %{buildroot}%{_libdir}/%{icecat_devel} rm -rf %{buildroot}%{_datadir}/idl/%{icecat_ver} rm -rf %{buildroot}%{_includedir}/%{icecat_ver} rm -rf %{buildroot}%{icecatappdir}/removed-files # Remove gtk2 support as flash plugin is no longer supported rm -rf %{buildroot}%{icecatappdir}/gtk2 mkdir -p %{buildroot}%{_metainfodir} install -pm 644 %{SOURCE10} %{buildroot}%{_metainfodir}/ # Moves defaults/preferences to browser/defaults/preferences %pretrans -p require 'posix' require 'os' if (posix.stat("%{icecatappdir}/browser/defaults/preferences", "type") == "link") then posix.unlink("%{icecatappdir}/browser/defaults/preferences") posix.mkdir("%{icecatappdir}/browser/defaults/preferences") if (posix.stat("%{icecatappdir}/defaults/preferences", "type") == "directory") then for i,filename in pairs(posix.dir("%{icecatappdir}/defaults/preferences")) do os.rename("%{icecatappdir}/defaults/preferences/"..filename, "%{icecatappdir}/browser/defaults/preferences/"..filename) end f = io.open("%{icecatappdir}/defaults/preferences/README","w") if f then f:write("Content of this directory has been moved to %{icecatappdir}/browser/defaults/preferences.") f:close() end end end %check appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %if 0%{?build_langpacks} %files -f %{name}.lang %else %files %endif %doc README.* AUTHORS %license LICENSE COPYING-* %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*x*/apps/%{name}*.png %{_metainfodir}/*.appdata.xml %{_mandir}/man1/%{name}* %dir %{icecatappdir} %{icecatappdir}/browser/ %{icecatappdir}/defaults/ %{icecatappdir}/dictionaries %{icecatappdir}/icecat* %{icecatappdir}/fonts/ %{icecatappdir}/*.so %{icecatappdir}/*.ini %{icecatappdir}/omni.ja %{icecatappdir}/run-icecat.sh %{icecatappdir}/dependentlibs.list %{icecatappdir}/plugin-container %{icecatappdir}/pingsender %{icecatappdir}/gmp-clearkey/ %if 0%{?build_langpacks} %dir %{langpackdir} %endif %files x11 %{_bindir}/%{name}-x11 %{_datadir}/applications/%{name}-x11.desktop %files wayland %{_bindir}/%{name}-wayland %{_datadir}/applications/%{name}-wayland.desktop %changelog %autochangelog