PKGBUILD 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Maintainer(Arch): Zhuoyun Wei <wzyboy@wzyboy.org>
  2. # Contributor: "Amhairghin" Oscar Garcia Amor (https://ogarcia.me)
  3. # Maintainer : Sagar Acharya <sagar@hyperbola.info>
  4. pkgname=python-magic
  5. pkgdesc='A python wrapper for libmagic'
  6. pkgver=0.4.20
  7. pkgrel=1
  8. arch=('any')
  9. url="https://github.com/ahupp/python-magic"
  10. license=('Expat')
  11. depends=('python')
  12. makedepends=('python-setuptools' 'quilt')
  13. provides=('python-magic')
  14. source=("https://github.com/ahupp/${pkgname}/archive/refs/tags/${pkgver}.tar.gz"
  15. "series"
  16. "2021-01-16.locale-in-tests.patch")
  17. sha512sums=('3927958a6957177d1a6e8bcbbb3723f489018f9037b619bbf7478ab68ba2ddd52d9a0caf18e6a73671e8e5e1cb8a9efb957756ba9547a7dd66ab6ba293f37826'
  18. '60eeda5905771fed5a73a4ba42fdb7fcadda2c4c4a709b29f8f0a4c196265ab088e78760e3a7b07a648ae31809a9a60bb9fec6f8dbcbbd2936db461b064fff1a'
  19. '1ebbe0b8323f6e337d3e9181add1db0490ecc3d135829d7a2573ed50c5066dc74d7ff2345d38f1e071906687889226fd50133b7e8d8911e03795fdd5e6a1bba7')
  20. prepare() {
  21. cd "${pkgname}-${pkgver}"
  22. mkdir ./patches
  23. cp ${srcdir}/series ./patches
  24. cp ${srcdir}/*.patch ./patches
  25. export QUILT_PATCHES=patches
  26. export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
  27. export QUILT_DIFF_ARGS='--no-timestamps'
  28. quilt push -av
  29. }
  30. package() {
  31. cd "${pkgname}-${pkgver}"
  32. python setup.py install --root="${pkgdir}" --optimize='1'
  33. install -D -m644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
  34. install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  35. }