blob: 8fef64d2605e28f8ca75ed4d4c2de07ebfb4664d (
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
60
61
|
# Maintainer: poly000 <1348292515@qq.com>
pkgname=waylyrics-git
_pkgname=waylyrics
_appname="io.poly000.${_pkgname}"
pkgver=0.1.0_r439.g1b40441
pkgrel=1
pkgdesc="general desktop lyrics with QQMusic/NetEase Cloud Music source"
url="https://github.com/waylyrics/waylyrics"
conflicts=('waylyrics')
provides=('waylyrics')
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64')
license=('MIT')
depends=('openssl' 'hicolor-icon-theme'
# base
'dbus' 'gcc-libs' 'glibc'
# gtk4
'glib2' 'cairo' 'dconf' 'gtk4')
makedepends=('cargo' 'git' 'jq' 'mimalloc' 'base-devel')
optdepends=()
source=("git+${url}.git")
sha256sums=('SKIP')
options=('!lto')
pkgver() {
cd "${_pkgname}"
semver=$(cargo metadata --no-deps --format-version=1 | jq -r '.packages | .[0] | .version')
echo "${semver}_r$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
}
build() {
cd "${_pkgname}"
# workarounds to allow enabling feature gates with stable rustc
# this should be ok since localkey is not in active development
export RUSTC_BOOTSTRAP=1
# template files
export WAYLYRICS_THEME_PRESETS_DIR="/usr/share/${_pkgname}/themes"
cargo build --locked --release --target-dir target
}
package() {
cd "$srcdir/$_pkgname"
install -vDm644 "${_appname}.desktop" -t "${pkgdir}/usr/share/applications/"
install -vDm755 "target/release/${_pkgname}" -t "${pkgdir}/usr/bin/"
install -vDm644 "${_appname}.gschema.xml" -t "${pkgdir}/usr/share/glib-2.0/schemas/"
install -vdm755 "${pkgdir}/usr/share/${_pkgname}/themes"
cp -arv themes/* "${pkgdir}/usr/share/${_pkgname}/themes/"
cp -arv res/* "${pkgdir}/usr/share/"
# License
install -vDm644 "LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
|