# The upstream .deb version appends a trailing ".0" to the version number. %global deb_version %{version}.0 # Preserve upstream binaries exactly as shipped; do not strip debug symbols. %global debug_package %{nil} %global __strip /bin/true Name: cloudflare-warp Version: 2026.4.1390 Release: 1%{?dist} Summary: Cloudflare WARP Client License: LicenseRef-Cloudflare-WARP URL: https://1.1.1.1 Source0: https://pkg.cloudflareclient.com/pool/noble/main/c/cloudflare-warp/cloudflare-warp_%{deb_version}_amd64.deb BuildRequires: binutils BuildRequires: tar BuildRequires: systemd-rpm-macros Requires: at-spi2-core Requires: cairo Requires: dbus Requires: fontconfig Requires: gdk-pixbuf2 Requires: glib2 Requires: glibc Requires: gtk3 Requires: harfbuzz Requires: hicolor-icon-theme Requires: libayatana-appindicator-gtk3 Requires: libayatana-indicator-gtk3 Requires: libcurl Requires: libdbusmenu-glib Requires: libepoxy Requires: libgcc Requires: libsoup3 Requires: libstdc++ Requires: nftables Requires: nspr Requires: nss Requires: pango Requires: webkit2gtk4.1 Requires: zlib Provides: warp-cli = %{version}-%{release} Provides: warp-diag = %{version}-%{release} Provides: warp-svc = %{version}-%{release} %description Cloudflare WARP replaces your default connection with a fast, private connection powered by Cloudflare's network. Includes warp-cli for command-line management, warp-svc as the system daemon, and the warp-taskbar tray applet for graphical sessions. %prep %setup -c -T # A .deb file is an ar(1) archive whose members include: # debian-binary — format version string # control.tar.* — package metadata and maintainer scripts # data.tar.* — the actual installed files (gz, xz, or zst) ar x %{SOURCE0} # GNU tar auto-detects compression, so this handles all three variants. mkdir build tar xf data.tar.* -C build/ %build # Nothing to build %install cp -a build/etc %{buildroot}/ cp -a build/usr %{buildroot}/ # The deb ships some files under top-level /bin and /lib (legacy Debian # paths). Relocate them into /usr, mirroring what the PKGBUILD does with # cp -R "${srcdir}/build/"{bin,lib} "${pkgdir}/usr" if [ -d build/bin ]; then cp -a build/bin/. %{buildroot}%{_bindir}/ fi if [ -d build/lib ]; then cp -a build/lib/. %{buildroot}%{_prefix}/lib/ fi # Guarantee the config directory exists even if upstream ships it empty. install -d %{buildroot}%{_sysconfdir}/cloudflare-warp # --- Patch warp-svc.service --- # Upstream wrote ExecStart against the legacy /bin path; redirect to /usr/bin. sed -i 's|ExecStart=/bin/warp-svc|ExecStart=/usr/bin/warp-svc|' \ %{buildroot}%{_unitdir}/warp-svc.service # --- Patch warp-taskbar.service --- # Relocate ExecStart and relax the session dependency: BindsTo is a hard # dependency that stops the unit the moment graphical-session.target stops; # PartOf is softer and avoids unnecessary service churn during session # transitions. sed -i \ -e 's|ExecStart=/bin/warp-taskbar|ExecStart=/usr/bin/warp-taskbar|' \ -e 's|BindsTo=graphical-session.target|PartOf=graphical-session.target|' \ %{buildroot}%{_userunitdir}/warp-taskbar.service %files %{_bindir}/warp-cli %{_bindir}/warp-diag %{_bindir}/warp-svc %{_bindir}/warp-taskbar %{_prefix}/lib/warp/ %{_unitdir}/warp-svc.service %{_userunitdir}/warp-taskbar.service %{_datadir}/applications/com.cloudflare.warp.desktop %{_datadir}/icons/hicolor/*/apps/com.cloudflare.warp* %{_datadir}/dbus-1/system.d/com.cloudflare.warp.conf %dir %{_sysconfdir}/cloudflare-warp %changelog %autochangelog