summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fd092a49192c7959b631dfb9093eb5edebb06091 (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
# Maintainer: willemw <willemw12@gmail.com>

pkgname=python2-twodict-git
pkgver=1.2.r2.g925d3bd
pkgrel=1
pkgdesc="Simple two way ordered dictionary for Python"
arch=('any')
url="https://github.com/MrS0m30n3/twodict"
license=('custom:UNLICENSE')
depends=('python2')
makedepends=('git')
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
source=($pkgname::git+$url.git)
md5sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

check() {
  cd $pkgname
  python2 test_twodict.py
}

package() {
  cd $pkgname
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${pkgname%-git}/LICENSE"
  python2 setup.py install --root="$pkgdir" --optimize=1
}