mirror of
https://github.com/archlinux/aur.git
synced 2026-02-18 02:25:24 +01:00
Update to 1.8.5
Automated build and publish via GitHub Actions. Co-Authored-By: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
commit
a4d67a265b
3 changed files with 109 additions and 0 deletions
23
.SRCINFO
Normal file
23
.SRCINFO
Normal file
|
|
@ -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
|
||||
32
PKGBUILD
Normal file
32
PKGBUILD
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
# Maintainer: SlotSun <slot_sun@outlook.com>
|
||||
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/"
|
||||
}
|
||||
54
upstream.sh
Normal file
54
upstream.sh
Normal file
|
|
@ -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
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue