summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3e517ddd44ef733d68c86b2eee64b02609a5dd59 (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
# Maintainer:  Dimitris Kiziridis <ragouel at outlook dot com>

pkgname=licen-git
pkgver=0.2.1.r29.5969f6b
pkgrel=1
pkgdesc="Generate your license. Yet another lice, but implement with Jinja2 and docopt"
arch=('any')
url='https://github.com/lord63/licen'
license=('MIT')
depends=('python-docopt'
         'python-jinja')
makedepends=('python-setuptools')
source=("licen::git+${url}")
sha256sums=('SKIP')

pkgver() {
  cd ${srcdir}/licen
  _version=$(awk -F ' ' 'NR==1{print substr($2,2,6)}' ${srcdir}/licen/ChangLog)
  printf "$_version.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

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

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