%{!?git_commit:%global git_commit %(curl -s https://api.github.com/repos/LadybirdBrowser/ladybird/commits/master | grep '"sha":' | head -1 | cut -d'"' -f4 || echo "unknown")} %{!?git_date:%global git_date %(date +%%Y%%m%%d)} %global shortcommit %(c=%{git_commit}; echo ${c:0:10}) Name: ladybird Version: 0.1.0 Release: 1.%{git_date}git%{shortcommit}%{?dist} Summary: A truly independent web browser using a novel engine based on web standards License: BSD-2-Clause URL: https://ladybird.org Source0: https://github.com/LadybirdBrowser/ladybird/archive/%{git_commit}/ladybird-%{git_commit}.tar.gz Patch0: ladybird-gcc14-concepts-fix.patch ExclusiveArch: x86_64 aarch64 BuildRequires: cmake >= 3.30 BuildRequires: ninja-build BuildRequires: gcc-c++ >= 14 BuildRequires: rust >= 1.75 BuildRequires: cargo >= 1.75 BuildRequires: git-core BuildRequires: curl BuildRequires: libngtcp2_crypto_ossl.so.0()(64bit) BuildRequires: ccache BuildRequires: pkgconfig BuildRequires: make BuildRequires: python3 >= 3.9 BuildRequires: python3-devel BuildRequires: autoconf >= 2.71 BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: libtool BuildRequires: nasm BuildRequires: patchelf BuildRequires: tar BuildRequires: unzip BuildRequires: zip BuildRequires: bison BuildRequires: flex BuildRequires: gperf BuildRequires: perl-interpreter BuildRequires: perl-generators BuildRequires: perl(FindBin) BuildRequires: perl(IPC::Cmd) BuildRequires: perl(lib) BuildRequires: perl(Time::Piece) BuildRequires: perl(File::Copy) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) BuildRequires: mesa-libGL-devel BuildRequires: mesa-libEGL-devel BuildRequires: libglvnd-devel BuildRequires: vulkan-headers BuildRequires: vulkan-loader-devel BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-protocols) BuildRequires: pkgconfig(wayland-cursor) BuildRequires: pkgconfig(wayland-egl) BuildRequires: pkgconfig(xkbcommon) BuildRequires: qt6-qtbase-devel >= 6.4 BuildRequires: qt6-qttools-devel BuildRequires: qt6-qtwayland-devel BuildRequires: zlib-ng-compat-static BuildRequires: openssl-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: liberation-sans-fonts %global debug_package %{nil} %bcond qt 1 %bcond tests 0 %bcond debug 0 Requires: liberation-sans-fonts Requires: google-noto-emoji-fonts Requires: hicolor-icon-theme Recommends: pulseaudio-libs Recommends: pipewire-pulseaudio Recommends: mesa-dri-drivers Recommends: mesa-vulkan-drivers Recommends: dbus Provides: bundled(skia) = 144 Provides: bundled(angle) = chromium_7258 Provides: bundled(ffmpeg) = 7.1.1 Provides: bundled(dav1d) = 1.5.1 Provides: bundled(libavif) = 1.3.0 Provides: bundled(libjxl) = 0.11.1 Provides: bundled(icu) = 78.1 Provides: bundled(harfbuzz) = 10.2.0 Provides: bundled(woff2) = 1.0.2 Provides: bundled(curl) = 8.16.0 Provides: bundled(openssl) = 3.5.3 Provides: bundled(nghttp2) = 1.68.0 Provides: bundled(libpng) = 1.6.50 Provides: bundled(libjpeg-turbo) = 3.1.1 Provides: bundled(libwebp) = 1.6.0 Provides: bundled(libtiff) Provides: bundled(simdjson) = 4.2.4 Provides: bundled(simdutf) = 7.4.0 Provides: bundled(sqlite) = 3.50.4 Provides: bundled(libxml2) = 2.13.8 Provides: bundled(fast-float) = 8.1.0 Provides: bundled(fontconfig) = 2.15.0 Provides: bundled(libtommath) = 1.3.0 Provides: bundled(cpptrace) = 1.0.2 Provides: bundled(dbus) = 1.16.2 Provides: bundled(libproxy) = 0.4.18 Provides: bundled(sdl3) = 3.2.28 Provides: bundled(zlib) = 1.3.1 %global _lto_cflags %{nil} %undefine _cmake_skip_rpath %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!.*brp-strip.*!!g') %global __requires_exclude ^lib(cpptrace|skia|simdjson|simdutf|sqlite3|libEGL_angle|libGLESv2_angle|icudata|icui18n|icuuc|tommath|avcodec|avformat|avutil|swresample|avif|brotlicommon|brotlidec|brotlienc|curl|crypto|ssl|dav1d|expat|fontconfig|freetype|harfbuzz|jpeg|jxl|jxl_cms|jxl_threads|png16|webp|webpdecoder|webpdemux|webpmux|woff2common|woff2dec|xml2|z|zstd|SDL3|openh264|opus|ogg|vorbis|vpx|tiff|lcms2|highway|nghttp2|nghttp3|ngtcp2)\\.so %global __provides_exclude ^lib(cpptrace|skia|simdjson|simdutf|sqlite3|libEGL_angle|libGLESv2_angle|icudata|icui18n|icuuc|tommath|avcodec|avformat|avutil|swresample|avif|brotlicommon|brotlidec|brotlienc|curl|crypto|ssl|dav1d|expat|fontconfig|freetype|harfbuzz|jpeg|jxl|jxl_cms|jxl_threads|png16|webp|webpdecoder|webpdemux|webpmux|woff2common|woff2dec|xml2|z|zstd|SDL3|openh264|opus|ogg|vorbis|vpx|tiff|lcms2|highway|nghttp2|nghttp3|ngtcp2)\\.so %global ladybird_libdir %{_libdir}/%{name} %global ladybird_libexecdir %{_libexecdir}/%{name} %global ladybird_libdir_rel lib64/%{name} %global ladybird_libexecdir_rel libexec/%{name} %description Ladybird is a truly independent web browser using a novel engine based on web standards. It is not a fork of or based on Blink, Gecko, or WebKit. Built specifically for RHEL 10, Rocky Linux 10, and Fedora 44. Wayland-only - X11 support has been dropped. Key features: - Multi-process architecture for security and stability - Independent LibWeb rendering engine - Independent LibJS JavaScript engine - Independent LibWasm WebAssembly implementation - Sandboxed renderer and network processes Components: - Main UI process (Qt6-based) - Compositor process (rendering pipeline) - WebContent renderer processes (one per tab) - ImageDecoder process (secure image handling) - RequestServer process (network requests) - WebWorker process (background JavaScript) Note: Ladybird is currently in a pre-alpha state, suitable for developers, testers, and early adopters. Many websites may not work correctly yet. %package devel Summary: Development files for Ladybird browser components %description devel Development files for embedding or extending Ladybird components. Warning: The Ladybird API is unstable and subject to change without notice. %prep %autosetup -n %{name}-%{git_commit} -p1 rm -rf Build/ %build export VCPKG_ROOT="${PWD}/Build/vcpkg" export VCPKG_FORCE_SYSTEM_BINARIES=1 export LADYBIRD_SOURCE_DIR="${PWD}" %ifarch x86_64 export CFLAGS="-march=x86-64-v2" export CXXFLAGS="-march=x86-64-v2" %endif %ifarch aarch64 export CFLAGS="-march=armv8-a" export CXXFLAGS="-march=armv8-a" %endif if [ ! -d "${VCPKG_ROOT}" ]; then mkdir -p Build git clone --depth=1 https://github.com/microsoft/vcpkg.git "${VCPKG_ROOT}" fi # Ensure we have full history for vcpkg versioning if [ -f "${VCPKG_ROOT}/.git/shallow" ]; then git -C "${VCPKG_ROOT}" fetch --unshallow fi if [ ! -x "${VCPKG_ROOT}/vcpkg" ]; then "${VCPKG_ROOT}/bootstrap-vcpkg.sh" -disableMetrics fi # Now unset RPM flags for the actual build unset CFLAGS CXXFLAGS LDFLAGS FFLAGS FCFLAGS %ifarch x86_64 export CFLAGS="-march=x86-64-v2" export CXXFLAGS="-march=x86-64-v2" %endif %ifarch aarch64 export CFLAGS="-march=armv8-a" export CXXFLAGS="-march=armv8-a" %endif mkdir -p Build/caches %if %{with debug} BUILD_TYPE="Debug" VCPKG_TRIPLETS="${PWD}/Meta/CMake/vcpkg/debug-triplets" %else BUILD_TYPE="Release" VCPKG_TRIPLETS="${PWD}/Meta/CMake/vcpkg/release-triplets" %endif cmake -B Build/release -S . \ -G Ninja \ -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \ -DCMAKE_C_COMPILER=gcc \ -DCMAKE_CXX_COMPILER=g++ \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_BINDIR=bin \ -DCMAKE_INSTALL_LIBDIR=%{ladybird_libdir_rel} \ -DCMAKE_INSTALL_LIBEXECDIR=%{ladybird_libexecdir_rel} \ -DCMAKE_INSTALL_DATADIR=share \ -DCMAKE_INSTALL_INCLUDEDIR=include \ -DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" \ -DVCPKG_INSTALL_OPTIONS="--no-print-usage" \ -DVCPKG_OVERLAY_TRIPLETS="${VCPKG_TRIPLETS}" \ -DBUILD_SHARED_LIBS=ON \ -DENABLE_QT=%{?with_qt:ON}%{!?with_qt:OFF} \ -DENABLE_INSTALL_FREEDESKTOP_FILES=ON \ -DENABLE_INSTALL_HEADERS=ON \ -DENABLE_GUI_TARGETS=ON \ -DENABLE_LTO_FOR_RELEASE=OFF \ -DLADYBIRD_CACHE_DIR="${PWD}/Build/caches" %ifarch x86_64 find Build/release -name 'build.ninja' -o -name 'flags.make' | xargs -r sed -i 's/-march=native/-march=x86-64-v2/g' %endif %ifarch aarch64 find Build/release -name 'build.ninja' -o -name 'flags.make' | xargs -r sed -i 's/-march=native/-march=armv8-a/g' %endif cmake --build Build/release --parallel %{?_smp_mflags} %install DESTDIR=%{buildroot} cmake --install Build/release VCPKG_LIB_DIR="${PWD}/Build/release/vcpkg_installed/x64-linux-dynamic/lib" if [ -d "${VCPKG_LIB_DIR}" ]; then find "${VCPKG_LIB_DIR}" -maxdepth 1 -name "*.so*" -exec cp -a {} %{buildroot}%{ladybird_libdir}/ \; fi for binary in %{buildroot}%{_bindir}/*; do if [ -f "$binary" ] && file "$binary" | grep -q "ELF.*executable"; then patchelf --set-rpath '%{ladybird_libdir}' "$binary" || : fi done for binary in %{buildroot}%{ladybird_libexecdir}/*; do if [ -f "$binary" ] && file "$binary" | grep -q "ELF"; then patchelf --set-rpath '%{ladybird_libdir}' "$binary" || : fi done for lib in %{buildroot}%{ladybird_libdir}/*.so*; do if [ -f "$lib" ] && ! [ -L "$lib" ] && file "$lib" | grep -q "ELF.*shared"; then patchelf --set-rpath '%{ladybird_libdir}' "$lib" || : fi done desktop-file-validate %{buildroot}%{_datadir}/applications/org.ladybird.Ladybird.desktop appstream-util validate-relax --nonet \ %{buildroot}%{_datadir}/metainfo/org.ladybird.Ladybird.metainfo.xml || : %check %if %{with tests} pushd Build/release ctest --output-on-failure --parallel %{?_smp_mflags} || : popd %endif %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun if [ $1 -eq 0 ]; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : update-desktop-database &>/dev/null || : %files %license LICENSE %doc README.md CONTRIBUTING.md CODE_OF_CONDUCT.md SECURITY.md ISSUES.md %doc Documentation/ %{_bindir}/Ladybird %{_bindir}/js %{_bindir}/wasm %{_prefix}/COMMIT %dir %{ladybird_libexecdir} %{ladybird_libexecdir}/Compositor %{ladybird_libexecdir}/ImageDecoder %{ladybird_libexecdir}/RequestServer %{ladybird_libexecdir}/WebContent %{ladybird_libexecdir}/WebWorker %dir %{ladybird_libdir} %{ladybird_libdir}/*.so.* %{_datadir}/Lagom/ %{_datadir}/applications/org.ladybird.Ladybird.desktop %{_datadir}/icons/hicolor/scalable/apps/org.ladybird.Ladybird.svg %{_datadir}/metainfo/org.ladybird.Ladybird.metainfo.xml %{_datadir}/dbus-1/services/org.ladybird.Ladybird.service %files devel %{ladybird_libdir}/*.so %{ladybird_libdir}/*.a %{_datadir}/Ladybird/ %{_includedir}/AK/ %{_includedir}/Lib*/ %{_includedir}/Services/ %{_includedir}/*Endpoint.h %changelog * Sun May 24 2026 Ante De Baas - 0.1.0-1 - Added libngtcp2 BuildRequires to fix git HTTPS clone error - Release now includes actual commit hash - Cleaned up spec file structure and removed excessive comments - Simplified from 480 to 326 lines (32% reduction) - Removed ladybird-devel package dependency on main package - Consolidated global settings and removed redundant comment blocks - Based on original spec from https://codeberg.org/dejan/rpms/src/branch/main/ladybird/ladybird.spec * Tue Feb 18 2025 Dejan Lekic - 0.1.0-0.20250218git2e3c59f791 - Update to latest snapshot (commit 2e3c59f791908f955b79937fb1ba0242fada1ac5) * Thu Jan 30 2025 Dejan Lekic - 0.1.0-0.20250130gita5cabf341b - Initial RPM package for Fedora 43+ - Pre-alpha development snapshot - Using vcpkg for hermetic dependency management - Qt6 UI enabled by default - Multi-process architecture with sandboxed renderers - Added devel subpackage with CMake configs and headers