The package was added pointing at v0.1.0 with a placeholder checksum, but that tag was never cut; upstream went straight to v1.0.0. The package has never built anywhere. Point at the real tag and fill the digest. The upstream watch keeps it current from here.
67 lines
2.5 KiB
Bash
67 lines
2.5 KiB
Bash
# Maintainer: Spencer Bull <spencer.bull@hey.com>
|
|
|
|
pkgname=elsewhen
|
|
pkgver=1.0.0
|
|
pkgrel=1
|
|
pkgdesc='World clock plugin for the Omarchy shell'
|
|
arch=('any')
|
|
url='https://github.com/omacom/elsewhen'
|
|
license=('MIT')
|
|
|
|
# What the plugin needs to load and run. It also shells out to bash, date
|
|
# (coreutils) and timedatectl (systemd) and reads /usr/share/zoneinfo
|
|
# (tzdata); those are members of the base group and stay implicit, per Arch
|
|
# convention. The citations for each entry are in .omarchy/README.md.
|
|
depends=(
|
|
'omarchy'
|
|
'python'
|
|
'quickshell'
|
|
)
|
|
|
|
options=('!debug')
|
|
|
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
|
|
sha256sums=('3124f0c0a19ebc1b158bcf04151cddd6c733ceeead88052186b6a54c46bee263')
|
|
|
|
package() {
|
|
# The packaged plugin root, scanned by the shell between its bundled
|
|
# plugins and ~/.config/omarchy/plugins since omarchy PR #12051. An older
|
|
# shell never looks here, so on it this package installs cleanly and does
|
|
# nothing; there is no omarchy version to pin until a release carries #12051.
|
|
local plugin="$pkgdir/usr/share/omarchy/plugins/omacom.elsewhen"
|
|
cd "$srcdir/$pkgname-$pkgver" || return 1
|
|
|
|
# The shell loads the entry point each manifest declares. A tree without
|
|
# either would install cleanly and never load, so fail the build instead of
|
|
# shipping it.
|
|
[[ -f manifest.json ]] || {
|
|
echo "release tree is missing manifest.json" >&2
|
|
return 1
|
|
}
|
|
grep -Eq '"id"[[:space:]]*:[[:space:]]*"omacom\.elsewhen"' manifest.json || {
|
|
echo "manifest.json does not declare the plugin id omacom.elsewhen" >&2
|
|
return 1
|
|
}
|
|
grep -Eq '"barWidget"[[:space:]]*:[[:space:]]*"Panel\.qml"' manifest.json || {
|
|
echo "manifest.json does not name Panel.qml as the bar widget entry point" >&2
|
|
return 1
|
|
}
|
|
[[ -f Panel.qml ]] || {
|
|
echo "release tree is missing the entry point Panel.qml" >&2
|
|
return 1
|
|
}
|
|
|
|
# An explicit allow-list of runtime files, so tests/, .github/ and the rest
|
|
# of the repository never reach the package. Directories end up 0755 and
|
|
# every file 0644: worldclock-data.py runs as `python3 <path>` and needs no
|
|
# execute bit. An unmatched glob is left literal and fails install, which
|
|
# is the right outcome for a release tree missing its QML or JS.
|
|
local file
|
|
for file in manifest.json cities.json world.json worldclock-data.py *.qml *.js; do
|
|
install -Dm644 "$file" "$plugin/$file"
|
|
done
|
|
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
|
}
|