summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d2f3ef620fd40d60c4c6ecc1e007bbe5beb8e919 (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
# Maintainer: getzze <getzze at gmail dot com>
# Contributor: Eric BĂ©langer <eric@archlinux.org>

pkgbase=python-feedparser-dev
pkgname=('python-feedparser-dev' 'python-sgmllib3k')
pkgver=6.0.2
pkgrel=1
pkgdesc="Parse RSS and Atom feeds in Python: development version"
arch=('any')
url="https://github.com/kurtmckee/feedparser/"
license=('custom')
provides=('python-feedparser')
conflicts=('python-feedparser')
makedepends=('python' 'libxml2' 'python-setuptools')
depends=('python' 'libxml2')
source=(feedparser-${pkgver}.tar.gz::https://github.com/kurtmckee/feedparser/archive/${pkgver}.tar.gz
        https://files.pythonhosted.org/packages/source/s/sgmllib3k/sgmllib3k-1.0.0.tar.gz)
sha256sums=('b211cfb80c4daefca64b773ade77340727187564fad9c2c94b37da8e1f03788f'
            '7868fb1c8bfa764c1ac563d3cf369c381d1325d36124933a726f29fcdaa812e9')


build() {
  cd "${srcdir}/sgmllib3k-1.0.0"
  python /usr/lib/python3.8/compileall.py sgmllib.py
}

package_python-feedparser-dev() {
  depends=('libxml2' 'python-sgmllib3k')

  cd "${srcdir}/feedparser-${pkgver}"
  python setup.py install --root="${pkgdir}"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/license"
}

package_python-sgmllib3k() {
  depends=('python')
  provides=('python-sgmllib')
  conflicts=('python-sgmllib')
  pkgdesc="Port of sgmllib to Python3"
  license=('PSF')

  cd "${srcdir}/sgmllib3k-1.0.0"
  install -Dm644 sgmllib.py \
    "${pkgdir}/usr/lib/python3.8/site-packages/sgmllib.py"
  install -Dm644 __pycache__/sgmllib.cpython-38.pyc \
    "${pkgdir}/usr/lib/python3.8/site-packages/__pycache__/sgmllib.cpython-38.pyc"
}