summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c46dda48b5ab1bf8586a5e8c96a88a53e3f75fcb (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 : Michael Herstine <sp1ff at pobox dot com>
pkgname=mpdpopm-git
pkgver=0.3.3
pkgrel=1
pkgdesc='Maintain ratings & playcounts for your mpd server (git version)'
arch=('x86_64')
url=https://github.com/sp1ff/mpdpopm
license=('GPL-3.0-or-later')
depends=("gcc-libs" "glibc")
makedepends=("base-devel" "cargo" "git" "texinfo")
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+https://github.com/sp1ff/mpdpopm.git")
sha256sums=('SKIP')

pkgver() {
    # Cribbed from the `ripgrep-git` package; mpdpopm is tagged in the same
    # format, so I *think* this is what `makepkg` wants...
    cd mpdpopm
    local tag=$(git tag --sort=-v:refname | grep '^[0-9]' | head -1)
    local commits_since=$(git rev-list $tag..HEAD --count)
    echo "$tag.r$commits_since.$(git log --pretty=format:'%h' -n 1)"
}

build() {
  cd mpdpopm
  ./bootstrap && ./configure --prefix=/usr
  make
}

check() {
  cd mpdpopm
  make check
}

package() {
  cd mpdpopm
  make DESTDIR="${pkgdir}/" install
}