arch-packages/PKGBUILD
2021-08-17 23:23:48 +02:00

36 lines
1.2 KiB
Bash

# Maintainer: Daniel Peukert <daniel@peukert.cc>
_projectname='spot'
pkgname="$_projectname-client"
pkgver='0.1.16'
pkgrel='1'
pkgdesc='Gtk/Rust native Spotify client'
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/xou816/$_projectname"
license=('MIT')
depends=('alsa-lib' 'glib2' 'gtk3' 'libhandy' 'libpulse' 'openssl')
optdepends=('org.freedesktop.secrets')
makedepends=('cargo' 'meson>=0.50.0')
checkdepends=('appstream-glib')
source=("$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('da9ca8d1c29d8e88bac630e25a07c9682d61ebf8ac61db77ee50db3f4adc3a40')
_sourcedirectory="$_projectname-$pkgver"
_builddirectory='build'
build() {
cd "$srcdir/"
meson setup --prefix '/usr' --libexecdir 'lib' --sbindir 'bin' --buildtype 'release' --wrap-mode 'nodownload' \
-Db_lto='true' -Db_pie='true' -Doffline='false' -Dfeatures='warn-cache' "$_sourcedirectory" "$_builddirectory"
meson compile -C "$_builddirectory"
}
check() {
cd "$srcdir/"
meson test -C "$_builddirectory" --timeout-multiplier -1
}
package() {
cd "$srcdir/"
DESTDIR="$pkgdir" meson install -C "$_builddirectory"
install -Dm644 "$_sourcedirectory/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}