summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 927f773428ba75ed2c5c5bd36be03cfab8c85932 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Maintainer: Sam Whited <sam@samwhited.com>
# Contributor: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Eli Schwartz <eschwartz@archlinux.org>

_pkgname=rawkit
pkgbase=python-rawkit-git
pkgname=('python-rawkit-git' 'python2-rawkit-git')
pkgver=v0.6.0_28_g1e99fc96edc0
pkgrel=2
pkgdesc="ctypes based libraw bindings "
arch=('any')
url="https://rawkit.readthedocs.io/"
license=('MIT')
depends=('libraw')
makedepends=('git'
             'python'
             'python2'
             'python-setuptools'
             'python2-setuptools')
checkdepends=('python-mock'
              'python2-mock'
              'python-pytest'
              'python2-pytest'
              'python-numpy'
              'python2-numpy')
conflicts=()
provides=()
source=("git+https://github.com/photoshell/rawkit.git")
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}/${_pkgname}"
  git describe --tags --long | sed s/-/_/g
}

build() {
  cd "${srcdir}"/${_pkgname}

  python setup.py build
  python2 setup.py build
}

check() {
  cd "${srcdir}"/${_pkgname}

  python -m pytest
  python2 -m pytest
}

package_python-rawkit-git() {
  depends+=('python')
  conflicts=("${pkgname%-git}")
  provides=("${pkgname%-git}")

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

package_python2-rawkit-git() {
  depends+=('python2')
  conflicts=("${pkgname%-git}")
  provides=("${pkgname%-git}")

  cd "${srcdir}"/${_pkgname}
  python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}

# vim: ts=2 sw=2 et: