arch-packages/PKGBUILD

41 lines
1.6 KiB
Text
Raw Normal View History

2021-02-18 14:07:27 +01:00
# Maintainer: Daniel Peukert <daniel@peukert.cc>
2021-09-10 02:10:25 +02:00
# Contributor: NicoHood <archlinux {cat} nicohood {dog} de>
2021-02-18 14:07:27 +01:00
_projectname='spot'
pkgname="$_projectname-client"
2021-10-09 00:01:40 +02:00
pkgver='0.2.0.1'
2021-08-17 23:23:48 +02:00
pkgrel='1'
2021-02-18 14:07:27 +01:00
pkgdesc='Gtk/Rust native Spotify client'
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/xou816/$_projectname"
license=('MIT')
2021-09-10 02:10:25 +02:00
depends=('alsa-lib' 'cairo' 'glib2' 'glibc' 'graphene' 'gtk4' 'libadwaita' 'libpulse' 'openssl' 'pango')
2021-03-14 09:34:04 +01:00
optdepends=('org.freedesktop.secrets')
makedepends=('cargo' 'meson>=0.50.0')
checkdepends=('appstream-glib')
2021-08-17 23:23:48 +02:00
source=("$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/$pkgver.tar.gz")
2021-10-09 00:01:40 +02:00
sha512sums=('2e0dd5b68d8f46fbf59d25fe37726f657d74d785b4c557b7665604dbc1b68bd288db003fa100b631f58aaa7f4a4f8aea361793c68ae9c52b6356fedbfe8a6296')
2021-09-10 02:10:25 +02:00
validpgpkeys=() # waiting for https://github.com/xou816/spot/issues/283
2021-02-18 14:07:27 +01:00
_sourcedirectory="$_projectname-$pkgver"
_builddirectory='build'
build() {
cd "$srcdir/"
2021-09-10 02:10:25 +02:00
# We're not using arch-meson, because upstream recommends using --buildtype 'release'
# The offline build flag is turned off, as we're not predownloading rust dependencies
meson setup --prefix '/usr' --libexecdir 'lib' --sbindir 'bin' --buildtype 'release' --wrap-mode 'nodownload' \
2021-09-10 02:10:25 +02:00
-Db_lto='true' -Db_pie='true' -Doffline='false' "$_sourcedirectory" "$_builddirectory"
2021-02-18 14:07:27 +01:00
meson compile -C "$_builddirectory"
}
check() {
cd "$srcdir/"
2021-05-31 15:27:33 +02:00
meson test -C "$_builddirectory" --timeout-multiplier -1
2021-02-18 14:07:27 +01:00
}
package() {
cd "$srcdir/"
2021-09-10 02:10:25 +02:00
meson install -C "$_builddirectory" --destdir "$pkgdir"
2021-02-18 14:07:27 +01:00
install -Dm644 "$_sourcedirectory/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}