summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a514da669234179d9090f4b523bc78fcc117be6a (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
# SPDX-License-Identifier: AGPL-3.0
#
# Maintainer:  Pellegrino Prevete (tallero) <pellegrinoprevete at gmail dot com>
# Maintainer:  Truocolo <truocolo@aol.com>
# Contributor: Oskar Roesler <oskar at oskar-roesler dot de>

_py="python2"
_pkg="cffi"
pkgname="${_py}-${_pkg}"
pkgver=1.15.1
pkgrel=3
pkgdesc="Foreign Function Interface for Python calling C code"
arch=(
  'aarch64'
  'arm'
  'armv6l'
  'armv7h'
  'i686'
  'mips'
  'pentium4'
  'powerpc'
  'x86_64'
)
url="https://${_pkg}.readthedocs.org/"
license=(
  'MIT'
)
depends=(
  "${_py}-pycparser"
)
makedepends=(
  "${_py}-setuptools"
)
_pypi_url="https://pypi.io/packages/source"
source=(
  "${_pypi_url}/${_pkg::1}/${_pkg}/${_pkg}-$pkgver.tar.gz"
)
sha256sums=(
  'd400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9')

build() {
  cd \
    "$srcdir/${_pkg}-${pkgver}"
  "${_py}" \
    setup.py \
      build
}

package() {
  cd \
    "${_pkg}-$pkgver"

  # remove files created during
  # check() for reproducible SOURCES.txt
  rm \
    -rf \
    testing/"${_pkg}"{0,1}/__pycache__/
  "${_py}" \
    setup.py \
      install \
        --root="${pkgdir}" \
        --optimize=1
  install \
    -Dm644 \
    LICENSE \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim:set sw=2 sts=-1 et: