mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-27 13:12:13 +08:00
31 lines
946 B
Bash
31 lines
946 B
Bash
# Maintainer: Ernesto Manríquez <alejandronova@gmail.com>
|
|
|
|
pkgname=python2-magic
|
|
pkgver=5.14
|
|
pkgrel=1
|
|
pkgdesc='Python bindings to allow you to access the libmagic api.'
|
|
arch=('i686' 'x86_64')
|
|
url='http://darwinsys.com/file/'
|
|
license=('custom')
|
|
depends=('file' 'python2')
|
|
conflicts=('python-magic')
|
|
replaces=('python-magic')
|
|
provides=('python-magic')
|
|
install=$pkgname.install
|
|
source=("ftp://ftp.astron.com/pub/file/file-${pkgver}.tar.gz")
|
|
md5sums=('c26625f1d6773ad4bc5a87c0e315632c')
|
|
|
|
build() {
|
|
cd "file-${pkgver}/python"
|
|
sed -i 's@/usr/bin/python@/usr/bin/python2@' ../magic/Magdir/python
|
|
python2 setup.py build
|
|
}
|
|
|
|
package() {
|
|
cd "file-${pkgver}/python"
|
|
mkdir -p "${pkgdir}/usr/lib/python2.7/lib-dynload"
|
|
cp build/lib/magic.py "${pkgdir}/usr/lib/python2.7/lib-dynload/"
|
|
install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
install -Dm644 "${srcdir}/file-${pkgver}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
|
|
}
|