blob: 4b8b2a6e61645f629d8414110241d268ed4c434b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Maintainer: Integral <integral@member.fsf.org>
pkgname=waylyrics
pkgver=0.3.21
pkgrel=2
pkgdesc="the furry way to show desktop lyrics"
arch=('x86_64' 'aarch64' 'riscv64')
url="https://github.com/${pkgname}/${pkgname}"
license=("MIT")
depends=(
"openssl" "dbus" "gcc-libs" "glib2" "cairo" "dconf" "gtk4" "gettext"
"opencc" "hicolor-icon-theme"
)
makedepends=("cargo")
optdepends=(
"breeze-icons: better tray-icon icons"
"xdg-desktop-portal: file dialog to import LRC"
)
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('7279ae1e6d25845d3baac08e8d515e7fa44881ad51146d08a25a3477e2388681')
options=('!lto')
prepare() {
cd "${pkgname}-${pkgver}/"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "${pkgname}-${pkgver}/"
export WAYLYRICS_THEME_PRESETS_DIR="/usr/share/${pkgname}/themes/"
cargo build --release --frozen --all-targets --all-features
}
check() {
cd "${pkgname}-${pkgver}/"
export WAYLYRICS_THEME_PRESETS_DIR="/usr/share/${pkgname}/themes/"
cargo test --release --frozen --all-features
}
package() {
cd "${pkgname}-${pkgver}/"
local APP_ID=io.github.waylyrics.Waylyrics
install -Dm755 "target/release/${pkgname}" -t "${pkgdir}/usr/bin/"
install -Dm644 "metainfo/${APP_ID}.desktop" -t "${pkgdir}/usr/share/applications/"
install -Dm644 "metainfo/${APP_ID}.gschema.xml" -t "${pkgdir}/usr/share/glib-2.0/schemas/"
install -Dm644 "metainfo/${APP_ID}.metainfo.xml" -t "${pkgdir}/usr/share/metainfo/"
install -Dm644 themes/*.css -t "${pkgdir}/usr/share/${pkgname}/themes/"
for locale in locales/*/LC_MESSAGES/waylyrics.po; do
echo "Installing locale $locale..."
mo=${locale/#locales\//} # */LC_MESSAGES/waylyrics.po
mo=${mo/%.po/.mo} # */LC_MESSAGES/waylyrics.mo
msgfmt "${locale}" -o - | install -Dm644 /dev/stdin "${pkgdir}/usr/share/locale/${mo}"
done
cp -r res/icons/ "${pkgdir}/usr/share/"
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
|