mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
08a66c4024
new pkg added to fullfill checkdepends new order file python3.order
61 lines
2.1 KiB
Bash
61 lines
2.1 KiB
Bash
#
|
|
# Apps Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# Maintainer: Adrian Chaves Fernandez (Gallaecio) <adriyetichaves@gmail.com>
|
|
|
|
_pkgname=feedparser
|
|
pkgbase=python-feedparser
|
|
pkgname=('python2-feedparser' 'python3-feedparser' 'python3-sgmllib')
|
|
pkgver=5.2.1
|
|
pkgrel=1
|
|
pkgdesc="feedparser is a Python library that parses feeds in all known formats, including Atom, RSS, and RDF."
|
|
arch=('any')
|
|
url="https://github.com/kurtmckee/feedparser/"
|
|
license=('MIT')
|
|
makedepends=('python2-setuptools' 'python3-setuptools')
|
|
source=(feedparser-${pkgver}.tar.gz::https://github.com/kurtmckee/feedparser/archive/${pkgver}.tar.gz)
|
|
sha1sums=('13c9a17f821e46ba9a34d8777e0ae47a6eb86de4')
|
|
|
|
prepare() {
|
|
cp -r feedparser-${pkgver} feedparser-${pkgver}-python2
|
|
cp -r feedparser-${pkgver} feedparser-${pkgver}-python3
|
|
cp -r feedparser-${pkgver} feedparser-${pkgver}-sgmllib
|
|
|
|
(cd feedparser-${pkgver}-python2; sed -i 's#env python$#env python2#' feedparser/feedparser.py)
|
|
(cd feedparser-${pkgver}-python3; 2to3 -w feedparser/feedparser.py feedparser/feedparsertest.py)
|
|
}
|
|
|
|
build() {
|
|
cd feedparser-${pkgver}-sgmllib
|
|
python3 /usr/lib/python3.5/compileall.py feedparser/sgmllib3.py
|
|
}
|
|
|
|
package_python2-feedparser() {
|
|
depends=('python2' 'libxml2' )
|
|
pkgdesc="Parse RSS and Atom feeds in Python2"
|
|
|
|
cd "${srcdir}/feedparser-${pkgver}-python2"
|
|
python2 setup.py install --root="${pkgdir}"
|
|
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/license"
|
|
}
|
|
|
|
package_python3-feedparser() {
|
|
depends=('libxml2' 'python3-sgmllib')
|
|
|
|
cd "${srcdir}/feedparser-${pkgver}-python3"
|
|
python3 setup.py install --root="${pkgdir}"
|
|
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/license"
|
|
}
|
|
|
|
package_python3-sgmllib() {
|
|
depends=('python3')
|
|
pkgdesc="Port of sgmllib to python-3"
|
|
license=('PSF')
|
|
|
|
cd "${srcdir}/feedparser-${pkgver}-sgmllib"
|
|
install -Dm644 feedparser/sgmllib3.py \
|
|
"${pkgdir}/usr/lib/python3.5/site-packages/sgmllib.py"
|
|
install -Dm644 feedparser/__pycache__/sgmllib3.cpython-35.pyc \
|
|
"${pkgdir}/usr/lib/python3.5/site-packages/__pycache__/sgmllib.cpython-35.pyc"
|
|
}
|