Files
MSYS2-packages/python-markupsafe/PKGBUILD
Christoph Reiter a58271b395 Make pkgbase of all packages match the name of the PKGBUILD directory
Similar to https://github.com/Alexpux/MINGW-packages/pull/2878
this adjusts the pkgbase names of all packages to match the directory
name the PKGBUILD is in.

The motivation for this is to provide links to PKGBUILD sources and
git history from the web interface.

The "dwz" directory is deleted as it just contains an older copy of the
elfutils PKGBUILD (elfutils isn't in the repo)
2018-01-28 08:43:40 +01:00

45 lines
1.2 KiB
Bash

# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=markupsafe
pkgbase="python-${_realname}"
pkgname=("python3-${_realname}" "python2-${_realname}")
pkgver=1.0
pkgrel=1
pkgdesc="Implements a XML/HTML/XHTML Markup safe string for Python"
arch=('i686' 'x86_64')
license=('custom')
url="https://pypi.python.org/pypi/MarkupSafe"
makedepends=("python2-setuptools" "python3-setuptools")
source=("https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-${pkgver}.tar.gz")
sha256sums=('a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665')
build() {
cd "$srcdir"
rm -rf python{2,3}-build
for builddir in python{2,3}-build; do
cp -r MarkupSafe-$pkgver $builddir
pushd $builddir
/usr/bin/${builddir%-build} setup.py build
popd
done
}
package_python3-markupsafe() {
depends=("python3")
cd "$srcdir/python3-build"
/usr/bin/python3 setup.py install --prefix=/usr --root="$pkgdir" -O1
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/python3-${_realname}/LICENSE"
}
package_python2-markupsafe() {
depends=("python2")
cd "$srcdir/python2-build"
/usr/bin/python2 setup.py install --prefix=/usr --root="$pkgdir" -O1
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/python2-${_realname}/LICENSE"
}