summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ee3b0088e0bfe864259926c65ed3711f8d9f47a6 (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
# Maintainer: Takumi <takuoh qt tutanota d0t com> # please replace q to a , 0 to o
pkgname=mpris-rp-git
_pkgname=mpris-rp
pkgver=r16.7fb6525
pkgrel=1
pkgdesc="A Rust program to generate Discord rich presences from MPRIS players. "
arch=(any)
url="https://github.com/nickofolas/mpris-rp"
license=('GPL')
depends=(gcc-libs)
makedepends=('rust' 'git') # 'bzr', 'git', 'mercurial' or 'subversion'
provides=($_pkgname)
install=$pkgname.install
source=("$_pkgname::git+$url"
	mpris-rp.service
	)

md5sums=('SKIP'
         '29740850b38217f203b06f7a557f5a95')

pkgver() {
	cd "$srcdir/${_pkgname}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "$srcdir/${_pkgname}"
	cargo build --release
}

check() {
	cd "$srcdir/${_pkgname}"
	cargo check --release
}

package() {
	cd "$_pkgname"
	install -Dm755 ./target/release/mpris-rp $pkgdir/usr/bin/mpris-rp
	install -Dm644 $srcdir/mpris-rp.service $pkgdir/usr/lib/systemd/user/mpris-rp.service
}