summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e7a96a1fc34be36afb6bd4ea24ea91fc247d3304 (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
# Maintainer: XZS <d dot f dot fischer at web dot de>
pkgname=python-grip-git
pkgver=3.3.0
pkgrel=1
pkgdesc="Preview GitHub Markdown files like Readme locally before committing them."
arch=('any')
url="https://github.com/joeyespo/grip"
license=('MIT')
depends=('python-requests' 'python-flask' 'python-docopt'
         'python-markdown' 'python-pygments' 'python-path-and-address')
makedepends=('python-setuptools')

makedepends+=('git')
source+=("${_gitname:=${pkgname%-git}}::${_giturl:-git+$url}")
md5sums+=('SKIP')
provides+=($_gitname)
conflicts+=($_gitname)

pkgver() {
  cd "$_gitname"
  grep -Po "(?<=version=').*(?=',)" setup.py | tr '\n' '.'
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

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