summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 247b5c18dca4dff53dfa415d2c66d01c1ad7689d (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: Ethan Brittain-Morby <ebm539 at protonmail dot com>
pkgname=python-metaname-git
pkgver=r14.ce20e21
pkgrel=2
pkgdesc="A python JSON-RPC client for the Metaname API"
arch=('any')
url="https://github.com/metaname/python-metaname"
license=('MIT')
depends=(python python-requests)
makedepends=(git)
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
source=("git+https://github.com/metaname/python-metaname")
sha256sums=('SKIP')

pkgver() {
  cd "${pkgname%-git}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "${pkgname%-git}"
  python setup.py build
}

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