summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8f528f06f948b367c2a6ed904d00e09ab6e625de (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: Lubosz Sarnecki <lubosz@gmail.com>

pkgname=python-icecream-git
pkgver=1.3.71.cd0113a
pkgrel=1
pkgdesc="Sweet and creamy print debugging."
arch=("any")
license=("MIT")
url="https://github.com/gruns/icecream"
depends=("python")
makedepends=("python-setuptools")
source=("git+https://github.com/gruns/icecream.git")
sha512sums=("SKIP")

pkgver() {
  cd icecream
  version=$(grep __version__ icecream/__init__.py | sed "s/__version__ = '//" | sed "s/'//")
  hash=$(git log --pretty=format:'%h' -n 1)
  revision=$(git rev-list --count HEAD)
  
  echo $version.$revision.$hash
}

build() {
  cd icecream
  python setup.py build
}

package() {
  cd icecream
  python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-icecream/LICENSE"
}