summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4458f08d172c19bb89b43009c24fbcc2842e24c0 (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: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG

pkgname=pjson-git
pkgver=1.0.r55.g0b7566a
pkgrel=1
pkgdesc="Command-line tool to validate and pretty-print JSON and XML (development version)"
url="http://igorgue.com/pjson"
arch=('any')
license=('MIT')
depends=('python' 'python-pygments' 'python-xmlformatter')
conflicts=('pjson')
provides=('pjson')
source=("git+https://github.com/igorgue/pjson.git")
md5sums=('SKIP')

pkgver() {
  cd pjson

  _ver=$(grep __version__ pjson/__init__.py | sed 's|[^0-9\.]||g')
  printf "%s.r%s.g%s" "$_ver" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd pjson

  python setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}