Created
September 11, 2025 22:50
-
-
Save yehezkieldio/3f0068a4c8b8379802e3a72e74dcfed7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pkgname=cloudflare-warp-nox-bin | |
| pkgver=2025.6.1335 | |
| pkgrel=1 | |
| pkgdesc="Cloudflare Warp Client (for servers without graphical environment) — CLI binaries renamed to avoid conflicts" | |
| arch=('x86_64') | |
| url="https://1.1.1.1" | |
| license=('unknown') | |
| depends=('dbus' 'gcc-libs' 'glibc' 'nftables' 'nspr' 'nss') | |
| # IMPORTANT: do NOT 'provide' warp-cli/warp-svc to avoid virtual-name conflicts | |
| provides=('cloudflare-warp-nox-bin') | |
| conflicts=('cloudflare-warp' 'cloudflare-warp-bin') | |
| options=('!debug' '!strip' '!emptydirs') | |
| source=("${pkgname}-${pkgver}.deb::https://pkg.cloudflareclient.com/pool/noble/main/c/cloudflare-warp/cloudflare-warp_${pkgver}.0_amd64.deb") | |
| noextract=("${pkgname}-${pkgver}.deb") | |
| b2sums=('e6d821aea30e53930c20c1ce59f95ac34c2a3161bf0454ce34ccddf81022cc130315256e98b2149c7d122bcd06b51048c754a03c54f44c08db6d9d366d40e978') | |
| prepare() { | |
| mkdir -p "${srcdir}/extract" | |
| # Extract data.tar.* from the .deb | |
| # The inner archive can be .xz or .zst depending on upstream; bsdtar handles both. | |
| bsdtar -O -xf "${pkgname}-${pkgver}.deb" data.tar.* | bsdtar -C "${srcdir}/extract" -x -f - | |
| } | |
| package() { | |
| install -d "${pkgdir}/usr/bin" "${pkgdir}/usr/lib/systemd/system" | |
| # Locate files regardless of exact upstream paths | |
| local cli svc diag unit | |
| cli="$(find "${srcdir}/extract" -type f -name 'warp-cli' -print -quit)" | |
| svc="$(find "${srcdir}/extract" -type f -name 'warp-svc' -print -quit)" | |
| diag="$(find "${srcdir}/extract" -type f -name 'warp-diag' -print -quit)" | |
| unit="$(find "${srcdir}/extract" -type f -name 'warp-svc.service' -path '*/system/*' -print -quit)" | |
| # Fail with a helpful message if the critical bits aren't found | |
| if [[ -z "$cli" || -z "$svc" ]]; then | |
| echo "Could not find warp-cli or warp-svc in extracted payload." | |
| echo "Present files under extract/:" | |
| find "${srcdir}/extract" -maxdepth 3 -type f | sed 's#^# #' | |
| return 1 | |
| fi | |
| # Install and rename to avoid conflicts | |
| install -Dm755 "$cli" "${pkgdir}/usr/bin/warpcf-cli" | |
| install -Dm755 "$svc" "${pkgdir}/usr/bin/warpcf-svc" | |
| if [[ -n "$diag" ]]; then | |
| install -Dm755 "$diag" "${pkgdir}/usr/bin/warpcf-diag" | |
| fi | |
| # Systemd unit: install under renamed service name | |
| if [[ -n "$unit" ]]; then | |
| sed -e 's#/bin/warp-svc#/usr/bin/warpcf-svc#g' \ | |
| -e 's#/usr/bin/warp-svc#/usr/bin/warpcf-svc#g' \ | |
| -e 's#^Description=.*#Description=Cloudflare WARP (renamed: warpcf-svc)#' \ | |
| "$unit" > "${pkgdir}/usr/lib/systemd/system/warpcf-svc.service" | |
| fi | |
| # Ensure no GUI helper is installed | |
| rm -f "${srcdir}/extract"/**/warp-taskbar 2>/dev/null || true | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment