From a4d67a265b6c64d3dcd7c99d3d6cf933f55f13d3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Jan 2026 15:33:59 +0000 Subject: [PATCH] Update to 1.8.5 Automated build and publish via GitHub Actions. Co-Authored-By: github-actions[bot] --- .SRCINFO | 23 +++++++++++++++++++++++ PKGBUILD | 32 +++++++++++++++++++++++++++++++ upstream.sh | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD create mode 100644 upstream.sh diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..bf0df716d868 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = slive-bin + pkgdesc = 基于Flutter的聚合直播软件,支持多平台直播源聚合与观看。 + pkgver = 1.8.5 + pkgrel = 1 + url = https://github.com/SlotSun/dart_simple_live + arch = x86_64 + arch = aarch64 + license = GPL-3.0-or-later + depends = gtk3 + provides = slive + conflicts = slive + options = !debug + options = !strip + source_x86_64 = Slive-x86_64-linux.zip::https://github.com/SlotSun/dart_simple_live/releases/download/v1.8.5/Slive-x86_64-linux.zip + source_x86_64 = https://raw.githubusercontent.com/SlotSun/dart_simple_live/refs/tags/v1.8.5/simple_live_app/assets/io.github.SlotSun.Slive.desktop + sha256sums_x86_64 = 81ca72da2057030f9aa507604ab961b30cb7ac7f0ca59f4620bd74e819b265a0 + sha256sums_x86_64 = SKIP + source_aarch64 = Slive-aarch64-linux.zip::https://github.com/SlotSun/dart_simple_live/releases/download/v1.8.5/Slive-aarch64-linux.zip + source_aarch64 = https://raw.githubusercontent.com/SlotSun/dart_simple_live/refs/tags/v1.8.5/simple_live_app/assets/io.github.SlotSun.Slive.desktop + sha256sums_aarch64 = SKIP + sha256sums_aarch64 = SKIP + +pkgname = slive-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..334ef4337255 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,32 @@ + +# Maintainer: SlotSun +pkgname=slive-bin +_pkgname=slive +pkgver=1.8.5 +pkgrel=1 +pkgdesc="基于Flutter的聚合直播软件,支持多平台直播源聚合与观看。" +arch=('x86_64' 'aarch64') +url="https://github.com/SlotSun/dart_simple_live" +license=('GPL-3.0-or-later') +provides=("${_pkgname}") +conflicts=("${_pkgname}") +options=('!debug' '!strip') +depends=('gtk3') +source_x86_64=("Slive-x86_64-linux.zip::https://github.com/SlotSun/dart_simple_live/releases/download/v1.8.5/Slive-x86_64-linux.zip" "https://raw.githubusercontent.com/SlotSun/dart_simple_live/refs/tags/v1.8.5/simple_live_app/assets/io.github.SlotSun.Slive.desktop") +source_aarch64=("Slive-aarch64-linux.zip::https://github.com/SlotSun/dart_simple_live/releases/download/v1.8.5/Slive-aarch64-linux.zip" "https://raw.githubusercontent.com/SlotSun/dart_simple_live/refs/tags/v1.8.5/simple_live_app/assets/io.github.SlotSun.Slive.desktop") +sha256sums_x86_64=('81ca72da2057030f9aa507604ab961b30cb7ac7f0ca59f4620bd74e819b265a0' 'SKIP') +sha256sums_aarch64=('SKIP' 'SKIP') + + +package() { + local app_id="io.github.SlotSun.Slive" + + install -d "${pkgdir}/opt/Slive" "${pkgdir}/usr/bin" + cp -a "${app_id}" data lib "${pkgdir}/opt/Slive/" + ln -s "/opt/Slive/${app_id}" "${pkgdir}/usr/bin/${app_id}" + + # 安装图标和桌面文件 + install -Dm644 data/flutter_assets/assets/images/logo.png "${pkgdir}/usr/share/icons/hicolor/256x256/apps/${app_id}.png" + install -Dm644 data/flutter_assets/assets/images/logo.png "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${app_id}.png" + install -Dm644 "${app_id}.desktop" -t "${pkgdir}/usr/share/applications/" +} \ No newline at end of file diff --git a/upstream.sh b/upstream.sh new file mode 100644 index 000000000000..e2edf6e762f5 --- /dev/null +++ b/upstream.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +pkg_detect_latest() { + local api_url="https://api.github.com/repos/SlotSun/dart_simple_live/releases" + local version + version="$(curl -fsSL "${api_url}" | jq -r '.[0].tag_name | ltrimstr("v")')" + if [[ -z "${version}" ]]; then + echo "Failed to parse version from API response" >&2 + return 1 + fi + + printf '%s\n' "${version}" +} + +pkg_get_update_params() { + local version="$1" + local base_url="https://github.com/SlotSun/dart_simple_live/releases/download/v${version}" + local filename="Slive-x86_64-linux.zip" + local url="${base_url}/${filename}" + + # Download and calculate SHA256 for x86_64 + local tmpdir tmpfile sha256 + tmpdir="$(mktemp -d)" + tmpfile="${tmpdir}/${filename}" + + curl -fsSL --retry 3 --retry-delay 2 -o "${tmpfile}" "${url}" + sha256="$(sha256sum "${tmpfile}" | awk '{print $1}')" + + + # Return: url filename pkgver hash_algo checksum + printf '%s %s %s %s %s\n' "${url}" "${filename}" "${version}" "sha256" "${sha256}" +} + +pkg_update_files() { + local url="$1" + local filename="$2" + local pkgver="$3" + local hash_algo="$4" + local checksum="$5" + local pkgbuild="${PKG_DIR}/PKGBUILD" + + local base_url="${url%/*}" + local url_x86_64="${base_url}/Slive-x86_64-linux.zip" + local url_aarch64="${base_url}/Slive-aarch64-linux.zip" + local desktop_url="https://raw.githubusercontent.com/SlotSun/dart_simple_live/refs/tags/v${pkgver}/simple_live_app/assets/io.github.SlotSun.Slive.desktop" + + sed -i "s/^pkgver=.*/pkgver=${pkgver}/" "${pkgbuild}" + sed -i "s/^pkgrel=.*/pkgrel=1/" "${pkgbuild}" + sed -i "s|^source_x86_64=.*|source_x86_64=(\"Slive-x86_64-linux.zip::${url_x86_64}\" \"${desktop_url}\")|" "${pkgbuild}" + sed -i "s|^source_aarch64=.*|source_aarch64=(\"Slive-aarch64-linux.zip::${url_aarch64}\" \"${desktop_url}\")|" "${pkgbuild}" + sed -i "s/^${hash_algo}sums_x86_64=.*/${hash_algo}sums_x86_64=('${checksum}' 'SKIP')/" "${pkgbuild}" + + echo "Warning: Only x86_64 checksum updated. Please verify aarch64 manually." >&2 +} \ No newline at end of file