Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:bberberov:prj_test
LibreWolf
LibreWolf.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File LibreWolf.spec of Package LibreWolf
# # spec file for package LibreWolf # # Copyright (c) 2024 SUSE LLC # Copyright (c) 2006-2024 Wolfgang Rosenauer <wr@rosenauer.org> # Copyright (c) 2021-2024 zzndb001 <zzndb001@gmail.com> # Copyright (c) 2024 Boian Berberov # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # ### general build definitions ### %define up_name firefox %define up_version 126.0.1 %define up_srcdir %{up_name}-%{up_version} %define openSUSE_srcdir firefox-maintenance-master %define LibreWolf_srcdir source %define LibreWolf_setdir settings ### Package ### Name: LibreWolf Version: 126.0.1 Release: 0 Summary: A custom version of Firefox, focused on privacy, security and freedom. License: MPL-2.0 URL: https://librewolf.net/ Source0: https://archive.mozilla.org/pub/%{up_name}/releases/%{up_version}/source/%{up_srcdir}.source.tar.xz Source1: https://github.com/openSUSE/firefox-maintenance/archive/refs/heads/master.tar.gz Source2: https://codeberg.org/librewolf/source/archive/126.0.1-1.tar.gz Source3: https://codeberg.org/librewolf/settings/archive/e439bde05b2980089b9c8a6f990562dcd9e9ca4a.tar.gz BuildRequires: autoconf213 BuildRequires: makeinfo BuildRequires: memory-constraints BuildRequires: update-desktop-files BuildRequires: xz BuildRequires: zip unzip # BuildRequires: Assemblers BuildRequires: nasm >= 2.14 BuildRequires: yasm # BuildRequires: GCC - TODO check version below %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150600 BuildRequires: gcc13 BuildRequires: gcc13-c++ %else BuildRequires: gcc-c++ %endif # BuildRequires: Clang %if 120000 <= 0%{?sle_version} && 0%{?sle_version} < 150000 BuildRequires: clang6-devel %else BuildRequires: clang-devel >= 5 %endif # BuildRequires: Rust %if 0%{?sle_version} BuildRequires: cargo1.76 BuildRequires: rust1.76 %else BuildRequires: cargo BuildRequires: rust %endif BuildRequires: rust-cbindgen >= 0.26 # BuildRequires: Python %if 120000 <= 0%{?sle_version} && 0%{?sle_version} < 150000 BuildRequires: libXtst-devel BuildRequires: python-libxml2 BuildRequires: python39 BuildRequires: python39-curses BuildRequires: python39-devel %else %if 150000 <= 0%{?sle_version} && 0%{?sle_version} <= 150600 BuildRequires: python39 BuildRequires: python39-curses BuildRequires: python39-devel %else BuildRequires: python3 >= 3.8, python3 <= 3.11 BuildRequires: python3-curses BuildRequires: python3-devel %endif %endif # BuildRequires: nodejs BuildRequires: nodejs >= 12.22.12 # BuildRequires: Headers BuildRequires: alsa-devel BuildRequires: dbus-1-glib-devel BuildRequires: libcurl-devel BuildRequires: libiw-devel BuildRequires: libproxy-devel BuildRequires: libXcomposite-devel BuildRequires: Mesa-devel BuildRequires: mozilla-nspr-devel >= 4.35 BuildRequires: mozilla-nss-devel >= 3.100 BuildRequires: xorg-x11-libXt-devel # BuildRequires: Libraries Requires: libfreetype6 >= 2.13.2 Requires: mozilla-nspr >= 4.35 Requires: mozilla-nss >= 3.100 # BuildRequires: pkgconfig BuildRequires: pkgconfig(glib-2.0) >= 2.22 BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gtk+-3.0) >= 3.14.0 BuildRequires: pkgconfig(gtk+-unix-print-3.0) BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(libpulse) # BuildRequires: Other BuildRequires: dejavu-fonts Requires(post): shared-mime-info desktop-file-utils Requires(postun): shared-mime-info desktop-file-utils Provides: appdata() Provides: appdata(firefox.appdata.xml) Provides: web_browser %ifarch %ix86 # Firefox only supports i686 ExclusiveArch: i686 %endif ExcludeArch: armv6l armv6hl ppc ppc64 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description A custom version of Firefox, focused on privacy, security and freedom. ### Build Steps ### %prep %setup -q -c -a 1 -a 2 -a 3 cd %{_builddir}/%{name}-%{version}/%{up_srcdir} # ### # LibreWolf Patches, etc. # From https://codeberg.org/librewolf/source/src/branch/main/scripts/librewolf-patches.py, Line 87 # ### # # create the right mozconfig file %__cp -v ../%{LibreWolf_srcdir}/assets/mozconfig.new.without-bootstrap mozconfig # # copy branding files %__cp -rv ../%{LibreWolf_srcdir}/themes/browser . # # copy the right search-config.json file %__cp -v ../%{LibreWolf_srcdir}/assets/search-config.json services/settings/dumps/main/search-config.json # # read lines of .txt file into 'patches' while read patch_filename do %__patch -p1 -i ../%{LibreWolf_srcdir}/${patch_filename} done < ../%{LibreWolf_srcdir}/assets/patches.txt # # apply xmas.patch seperately because not all builders use this repo the same way, # and we don't want to disturbe those workflows %__patch -p1 -i ../%{LibreWolf_srcdir}/patches/xmas.patch # # vs_pack.py issue... should be temporary %__cp -v ../%{LibreWolf_srcdir}/patches/pack_vs.py build/vs/ # # Apply most recent `settings` repository files. %__mkdir -p lw %__cp -v ../%{LibreWolf_setdir}/librewolf.cfg lw/ %__cp -v ../%{LibreWolf_setdir}/distribution/policies.json lw/ %__cp -v ../%{LibreWolf_setdir}/defaults/pref/local-settings.js lw/ # # pref-pane patches # # 1) patch it in %__patch -p1 -i ../%{LibreWolf_srcdir}/patches/pref-pane/pref-pane-small.patch # # 2) new files %__cp -v ../%{LibreWolf_srcdir}/patches/pref-pane/category-librewolf.svg browser/themes/shared/preferences/category-librewolf.svg %__cp -v ../%{LibreWolf_srcdir}/patches/pref-pane/librewolf.css browser/themes/shared/preferences/librewolf.css %__cp -v ../%{LibreWolf_srcdir}/patches/pref-pane/librewolf.inc.xhtml browser/components/preferences/librewolf.inc.xhtml %__cp -v ../%{LibreWolf_srcdir}/patches/pref-pane/librewolf.js browser/components/preferences/librewolf.js # # 3) append our locale string values to preferences.ftl %__cat \ ../%{LibreWolf_srcdir}/patches/pref-pane/preferences.ftl \ >> browser/locales/en-US/browser/preferences/preferences.ftl # # provide a script that fetches and bootstraps Nightly and some mozconfigs # %__cp -v ../%{LibreWolf_srcdir}/scripts/mozfetch.sh lw/ # %__cp -v \ # ../%{LibreWolf_srcdir}/assets/mozconfig.new \ # ../%{LibreWolf_srcdir}/assets/mozconfig.new.without-bootstrap \ # ../%{LibreWolf_srcdir}/scripts/setup-wasi-linux.sh \ # lw/ # # override the firefox version echo "%{version}-%{release}" > browser/config/version.txt echo "%{version}-%{release}" > browser/config/version_display.txt # # generate locales # ../scripts/generate-locales.sh # # openSUSE patches # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-nongnome-proxies.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-kde.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-ntlm-full-path.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-aarch64-startup-crash.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-fix-aarch64-libopus.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-s390-context.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-pgo.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-reduce-rust-debuginfo.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-bmo1504834-part1.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-bmo1504834-part3.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-bmo1512162.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-bmo849632.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-bmo998749.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-libavcodec58_91.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-silence-no-return-type.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-bmo531915.patch # %__patch -p1 ../%{openSUSE_srcdir}/one_swizzle_to_rule_them_all.patch # %__patch -p1 ../%{openSUSE_srcdir}/svg-rendering.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-partial-revert-1768632.patch # %__patch -p1 ../%{openSUSE_srcdir}/mozilla-rust-disable-future-incompat.patch # # Patch24: mozilla-bmo1822730.patch # # Patch25: mozilla-bmo1886378.patch # # openSUSE Firefox/browser # %__patch -p1 ../%{openSUSE_srcdir}/firefox/firefox-kde.patch # # Patch102: firefox-branded-icons.patch %build cd %{_builddir}/%{name}-%{version}/%{up_srcdir} export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system %set_build_flags export MOZBUILD_STATE_PATH=%{_builddir}/%{name}-%{version}/mozbuild %ifarch %ix86 # Not enough memory on 32-bit systems, reduce debug info. export CFLAGS="${CFLAGS} -g1" export CXXFLAGS="${CXXFLAGS} -g1" %endif export LDFLAGS="${LDFLAGS} -fPIC -Wl,-z,relro,-z,now" # cat << EOF > mozconfig # # MOZBUILD_STATE_PATH # mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} # mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj # # mk_add_options MOZ_CRASHREPORTER=0 # mk_add_options MOZ_DATA_REPORTING=0 # mk_add_options MOZ_SERVICES_HEALTHREPORT=0 # mk_add_options MOZ_TELEMETRY_REPORTING=0 # # ac_add_options --disable-bootstrap # ac_add_options --prefix=%{_prefix} # ac_add_options --libdir=%{_libdir} # ac_add_options --includedir=%{_includedir} # # ac_add_options --enable-release # # ac_add_options --enable-hardening # Default is same as enable # ac_add_options --disable-crashreporter # ac_add_options --disable-debug # ac_add_options --disable-official-branding # ac_add_options --disable-tests # ac_add_options --disable-updater # # ac_add_options --allow-addon-sideload # ac_add_options --with-unsigned-addon-scopes=app,system # # # ac_add_options --enable-alsa # # ac_add_options --enable-libproxy # # ac_add_options --enable-default-toolkit=cairo-gtk3 # # # System libraries # ac_add_options --with-system-nspr # ac_add_options --with-system-nss # ac_add_options --with-system-zlib # # # at least temporary until the "wasi-sysroot" issue is solved # ac_add_options --without-wasm-sandboxed-libraries # # # Architecture-specific # %ifarch x86_64 aarch64 # ac_add_options --enable-rust-simd # x86_64 aarch64 # %else # ac_add_options --disable-rust-simd # not x86_64 aarch64 # %endif # # %ifarch %arm # ac_add_options --with-fpu=vfpv3-d16 # %arm # ac_add_options --with-float-abi=hard # %arm # %ifarch armv6l armv6hl # ac_add_options --with-arch=armv6 # armv6l armv6hl # %endif # %ifarch armv7l armv7hl armv7hnl # ac_add_options --with-arch=armv7-a # armv7l armv7hl armv7hnl # %endif # %endif # # # LTO - TODO # %ifarch x86_64 # # LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506) # %if 1500 < 0%{?suse_version} # ac_add_options --enable-lto # %else # ac_add_options --disable-lto # %endif # %endif # # # PGO # # EOF # export MOZ_NOSPAM=1 %ifarch aarch64 %arm ppc64 ppc64le riscv64 %limit_build -m 2500 %endif ./mach configure # ./mach build --verbose %install # export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system # ./mach install %post # update mime and desktop database %mime_database_post %desktop_database_post %icon_theme_cache_post exit 0 %postun # update mime and desktop database %desktop_database_postun %mime_database_postun %icon_theme_cache_postun exit 0 %files %license %{up_srcdir}/LICENSE # %doc add-docs-here %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor