makedeb


playerctl-git 1b19a71c2021.09.25-2


mpris media player controller and lib for spotify, vlc, audacious, bmp, xmms2, and others.

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for playerctl-git.

# Maintainer: only_vip  <onlyme_vip@protonmail.com>
# thanks to aur Maintainer: timescam <rex.ky.ng at gmail dot com>
pkgname=playerctl-git
_pkgname=playerctl
pkgver=1b19a71c2021.09.25
pkgrel=2
pkgdesc="mpris media player controller and lib for spotify, vlc, audacious, bmp, xmms2, and others."
arch=('i686' 'amd64')
url="https://github.com/acrisci/playerctl"
license=('LGPL3')
depends=('libglib2.0-0' 'libglib2.0-bin')
makedepends=('git' 'meson' 'ninja-build' 'gobject-introspection' 'gtk-doc-tools')
optdepends=('python3-gi')
provides=('playerctl' 'libplayerctl2')
conflicts=('playerctl' 'libplayerctl2')
source=("$_pkgname::git+https://github.com/acrisci/playerctl.git")
sha256sums=("SKIP")

pkgver() {
        cd "$srcdir/$_pkgname"
        _always=$(git describe --always | sed -e 's:-:.:g') # tag is mobile, and switches between numbers and letters, can't use it for versioning
        _commits=$(git rev-list --count HEAD | sed 's:-:.:g') # total commits is the most sane way of getting incremental pkgver
        _date=$(git log -1 --date=short --pretty=format:%cd)
        printf "%s%s%s\n" "${_commits}" "${_always}" "${_date}" | sed -e 's:-:.:g'  -e 's:_:.:g'
}

build() {
    	cd "$srcdir/$_pkgname"
    	meson build -D bash-completions=true -D zsh-completions=true -D prefix=/usr
        ninja -C build
}
package() {
    	cd "$srcdir/$_pkgname"
        DESTDIR="${pkgdir}" ninja -C build install
}