blob: b17f777b4362785822c56fbd73430760c7fae6b4 (
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
|
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py-magic
_pkgname=${pkgname/py/python}
pkgver=0.4.12
pkgrel=1
pkgdesc="A python wrapper for libmagic"
url="https://pypi.python.org/pypi/python-magic/"
arch="noarch"
license="MIT"
depends=""
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="$pkgname-$pkgver.tar.gz::https://github.com/ahupp/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build || return 1
python3 setup.py build || return 1
}
package() {
mkdir -p "$pkgdir"
}
_py() {
local python=$1
pkgdesc="$pkgdesc (for $python)"
depends="$python libmagic"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
_py2() {
replaces="$pkgname"
_py python2
}
_py3() {
_py python3
}
md5sums="b0c173bd9904db97c5b3ebd9396b9cf4 py-magic-0.4.12.tar.gz"
sha256sums="cbfd4d1a8145e2b67663127f961df1c642e7dc7e15251d3b864811f68d7bb23d py-magic-0.4.12.tar.gz"
sha512sums="bd87f90cbabb8124892fb3ed4e9c992d067cc88dc45c9e069af7aa42f3d531c4bf051232242f69ad15e24de10e6c34e8d2b8de48ceb1d8c54de49086072afc9a py-magic-0.4.12.tar.gz"
|