1+ pkgname=ice-bin
2+ pkgver=0.0.0
3+ pkgrel=1
4+ pkgdesc=" Ice CLI streaming player (prebuilt binary from latest GitHub release)"
5+ arch=(' x86_64' ' aarch64' )
6+ url=" https://github.com/Wraient/ice"
7+ license=(' MIT' )
8+ depends=(' mpv' )
9+ optdepends=(' rofi: graphical selection via rofi' )
10+ provides=(' ice' )
11+ conflicts=(' ice' )
12+
13+ _src_linux_amd64=" ice-linux-amd64.tar.gz"
14+ _src_linux_arm64=" ice-linux-arm64.tar.gz"
15+
16+ source_x86_64=(" ${_src_linux_amd64} ::https://github.com/Wraient/ice/releases/latest/download/ice-linux-amd64.tar.gz" \
17+ " LICENSE::https://raw.githubusercontent.com/Wraient/ice/main/LICENSE" )
18+ source_aarch64=(" ${_src_linux_arm64} ::https://github.com/Wraient/ice/releases/latest/download/ice-linux-arm64.tar.gz" \
19+ " LICENSE::https://raw.githubusercontent.com/Wraient/ice/main/LICENSE" )
20+
21+ sha256sums_x86_64=(' SKIP' ' SKIP' )
22+ sha256sums_aarch64=(' SKIP' ' SKIP' )
23+
24+ pkgver () {
25+ # Attempt to derive version from latest tag via headers (optional).
26+ # This runs in makepkg environment with network disabled by default unless --holdver.
27+ # Fallback keeps placeholder.
28+ command -v curl > /dev/null 2>&1 || { echo " $pkgver " ; return ; }
29+ latest=$( curl -Is https://github.com/Wraient/ice/releases/latest | sed -n ' s/^location: .*\/tag\/v\?\([^[:space:]]*\).*/\1/p' | tr -d ' \r' )
30+ if [[ -n $latest ]]; then
31+ echo " $latest "
32+ else
33+ echo " $pkgver "
34+ fi
35+ }
36+
37+ build () {
38+ : # no build (precompiled binary)
39+ }
40+
41+ package () {
42+ cd " $srcdir "
43+ case " $CARCH " in
44+ x86_64)
45+ tar -xzf " ${_src_linux_amd64} "
46+ install -Dm755 " ice-linux-amd64" " $pkgdir /usr/bin/ice"
47+ ;;
48+ aarch64)
49+ tar -xzf " ${_src_linux_arm64} "
50+ install -Dm755 " ice-linux-arm64" " $pkgdir /usr/bin/ice"
51+ ;;
52+ esac
53+ install -Dm644 LICENSE " $pkgdir /usr/share/licenses/$pkgname /LICENSE"
54+ # Example shell completion placeholder (user can extend later)
55+ install -d " $pkgdir /usr/share/bash-completions" > /dev/null 2>&1 || true
56+ }
57+
58+ # vim:set ts=2 sw=2 et:
0 commit comments