initial import
This commit is contained in:
42
python-bleach/PKGBUILD
Normal file
42
python-bleach/PKGBUILD
Normal file
@@ -0,0 +1,42 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=python-bleach
|
||||
pkgver=5.0.1
|
||||
_debver=$pkgver
|
||||
_debrel=2
|
||||
pkgrel=1
|
||||
pkgdesc="An easy whitelist-based HTML-sanitizing tool"
|
||||
url="https://pypi.org/project/bleach/"
|
||||
arch=('any')
|
||||
license=('Apache-2.0')
|
||||
depends=('python-packaging' 'python-six' 'python-webencodings')
|
||||
makedepends=('python' 'python-setuptools' 'quilt')
|
||||
source=("https://pypi.org/packages/source/b/bleach/bleach-$pkgver.tar.gz"
|
||||
"https://deb.debian.org/debian/pool/main/p/python-bleach/python-bleach_$_debver-$_debrel.debian.tar.xz")
|
||||
sha512sums=('6c8e80eaf6db6f0e6d9066f3443192f44c489e079945b6d11b11e7eb270ea865011019e05d43c7896262dc11ca168e697630d9da8dca9f5bb48f0e2161fda6c8'
|
||||
'4c92afcc7fb3c09f8e72e24ffd38015fdd1827cfc59f984c12886bbc17e5b6efc2bc0756d25df899221188281557612fce3d3e762a18c15ee5857a9b2e1a89e5')
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir"/bleach-$pkgver
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/bleach-$pkgver
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir"/bleach-$pkgver
|
||||
python setup.py install --skip-build --optimize=1 --root="$pkgdir"
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
|
||||
}
|
||||
Reference in New Issue
Block a user