summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3d8c9bd2dd80df0bf6dc368e483e0fc80a973c60 (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
# Maintainer: ZaZam <zazaamm at gmail dot com>

_gitname=mpd_queue_random_album
pkgname=mpd_queue_random_album-git
pkgver=1.0.0.843d9c3
pkgrel=1
pkgdesc="Python program to append mpd queue with random albums."
arch=('any')
url="https://github.com/ibeex/$_gitname"
license=('MIT')
depends=('python' 'python-mpd2')
makedepends=('git')
conflicts=('mpdrandom')
source=("git+https://github.com/ibeex/$_gitname")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$_gitname"
## getting the version from setup.py and the id of HEAD
  printf "`grep -o 'version=".*"' setup.py | tr -d 'version="'`.`git rev-parse --short HEAD`"
## git describe does not work here as there are no tags yet
#  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$srcdir/$_gitname"
  python setup.py build
}

package() {
  cd "$srcdir/$_gitname"
  python setup.py install --root="$pkgdir/"
}