python-magic/PKGBUILD
2024-10-22 19:43:57 +08:00

38 lines
1.1 KiB
Bash

# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=python-magic
pkgver=0.4.27
pkgrel=1
pkgdesc="A python wrapper for libmagic"
arch=('x86_64')
url="https://github.com/ahupp/python-magic"
license=('MIT')
depends=('file' 'python')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=(https://github.com/ahupp/python-magic/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
545a2a561522efc2869066792062694b59b1b39c.patch)
sha256sums=(3978a25d43d9a7b8a89ae9d726bd4962fc90dc4f69ae852e399f3c56d4b0bd63
95949e7d738738deb8fa79d45f35f2b9132bc57c96649e08acc9ca944c69de8a)
prepare() {
cd ${pkgname}-${pkgver}
patch -Np1 -i ${srcdir}/545a2a561522efc2869066792062694b59b1b39c.patch
}
build() {
cd ${pkgname}-${pkgver}
python3 -m build --wheel --no-isolation
}
package() {
cd ${pkgname}-${pkgver}
python3 -m installer --destdir=${pkgdir} dist/*.whl
}