From 827762a6d4ddd4b31c68195b68dfa2c351a4c0c3 Mon Sep 17 00:00:00 2001 From: Felitendo <95575686+Felitendo@users.noreply.github.com> Date: Fri, 24 Jul 2026 09:13:19 +0200 Subject: [PATCH] librepods-bin: add package (1.0.0rc1-1) --- librepods-bin/.SRCINFO | 21 +++++++++++++++++++ librepods-bin/PKGBUILD | 21 +++++++++++++++++++ librepods-bin/pkg.sh | 46 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 librepods-bin/.SRCINFO create mode 100644 librepods-bin/PKGBUILD create mode 100644 librepods-bin/pkg.sh diff --git a/librepods-bin/.SRCINFO b/librepods-bin/.SRCINFO new file mode 100644 index 0000000..b9184d1 --- /dev/null +++ b/librepods-bin/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = librepods-bin + pkgdesc = AirPods liberated from Apple's ecosystem (prebuilt) + pkgver = 1.0.0rc1 + pkgrel = 1 + url = https://github.com/librepods-org/librepods + arch = x86_64 + license = GPL-3.0-only + depends = glibc + depends = gcc-libs + depends = hicolor-icon-theme + depends = libpulse + depends = openssl + depends = qt6-base + depends = qt6-connectivity + depends = qt6-declarative + provides = librepods + conflicts = librepods + source = https://github.com/Felitendo/PKGBUILDS/releases/download/librepods-bin-1.0.0rc1/librepods-bin-1.0.0rc1.tar.zst + sha256sums = 69ce19414a0205d1d19fb851f6adea6c231013df6ec8a32bc8122d5fd6e9dd52 + +pkgname = librepods-bin diff --git a/librepods-bin/PKGBUILD b/librepods-bin/PKGBUILD new file mode 100644 index 0000000..6bbf1c8 --- /dev/null +++ b/librepods-bin/PKGBUILD @@ -0,0 +1,21 @@ +# Maintainer: Felitendo +# This PKGBUILD is updated automatically: +# https://github.com/Felitendo/PKGBUILDS + +pkgname=librepods-bin +pkgver=1.0.0rc1 +pkgrel=1 +pkgdesc="AirPods liberated from Apple's ecosystem (prebuilt)" +arch=('x86_64') +url="https://github.com/librepods-org/librepods" +license=('GPL-3.0-only') +depends=('glibc' 'gcc-libs' 'hicolor-icon-theme' 'libpulse' 'openssl' + 'qt6-base' 'qt6-connectivity' 'qt6-declarative') +provides=('librepods') +conflicts=('librepods') +source=("https://github.com/Felitendo/PKGBUILDS/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.zst") +sha256sums=('69ce19414a0205d1d19fb851f6adea6c231013df6ec8a32bc8122d5fd6e9dd52') + +package() { + cp -a "$srcdir/usr" "$pkgdir/" +} diff --git a/librepods-bin/pkg.sh b/librepods-bin/pkg.sh new file mode 100644 index 0000000..bf5360e --- /dev/null +++ b/librepods-bin/pkg.sh @@ -0,0 +1,46 @@ +# librepods-bin - prebuilt package of https://github.com/librepods-org/librepods +# (AirPods integration for Linux, Qt6/C++ client in the linux/ subdirectory). +# +# Upstream releases carry only Android APKs, so build_artifact() builds the +# Linux client from the release tarball. Upstream tags look like v1.0.0-rc1; +# pkgver strips the hyphen (1.0.0rc1, sorts before 1.0.0 in vercmp) and +# build_artifact re-inserts it for the tag URL. + +UPSTREAM_REPO="librepods-org/librepods" + +# Installed in CI (pacman) before build_artifact runs. +BUILD_DEPS=(cmake qt6-base qt6-connectivity qt6-declarative qt6-tools + libpulse openssl) + +latest_version() { + gh api "repos/$UPSTREAM_REPO/releases/latest" --jq '.tag_name' | sed 's/^v//; s/-//g' +} + +# build_artifact +build_artifact() { + local ver="$1" outfile="$2" + local upver workdir destdir srctree + upver="$(sed -E 's/([a-z])/-\1/' <<< "$ver")" + workdir="$(mktemp -d)" + destdir="$(mktemp -d)" + + curl -sfL "https://github.com/$UPSTREAM_REPO/archive/refs/tags/v$upver.tar.gz" | tar -xz -C "$workdir" + srctree="$workdir/librepods-$upver" + + cmake -B "$workdir/build" -S "$srctree/linux" -Wno-dev \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_SKIP_RPATH=TRUE + cmake --build "$workdir/build" -j"$(nproc)" + DESTDIR="$destdir" cmake --install "$workdir/build" + + # These caches are generated by pacman hooks; shipping them would cause + # file conflicts on install. + rm -f "$destdir/usr/share/applications/mimeinfo.cache" \ + "$destdir/usr/share/icons/hicolor/icon-theme.cache" + + tar --zstd --sort=name --owner=0 --group=0 --numeric-owner --mtime='@0' \ + -cf "$outfile" -C "$destdir" usr + + rm -rf "$workdir" "$destdir" +}