desktop/python-magic/PKGBUILD
2017-10-28 20:02:10 +02:00

39 lines
1.1 KiB
Bash

# Maintainer: Manuel 'UtG' <utg[dot]chakra.linux[at]gmail[dot]com>
pkgbase=python-magic
pkgname=(python2-magic python3-magic)
pkgver=5.29
pkgrel=1
pkgdesc="Python bindings to the magic library"
arch=('x86_64')
url='http://darwinsys.com/file/'
license=('custom')
makedepends=('python2' 'python3' 'python2-setuptools' 'python3-setuptools')
source=("ftp://ftp.astron.com/pub/file/file-${pkgver}.tar.gz")
md5sums=('e6a972d4e10d9e76407a432f4a63cd4c')
install=$pkgbase.install
prepare() {
cp -r file-${pkgver} python2-file-${pkgver}
}
package_python3-magic() {
depends=('python3' 'file')
cd "${srcdir}/file-${pkgver}/python"
python3 setup.py install --root="${pkgdir}" --optimize=1
install -Dm0644 "${srcdir}/file-${pkgver}/COPYING" \
"${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
package_python2-magic() {
depends=('python2' 'file')
cd "${srcdir}/python2-file-${pkgver}/python"
python2 setup.py install --root="${pkgdir}" --optimize=1
install -Dm0644 "${srcdir}/python2-file-${pkgver}/COPYING" \
"${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}