Files
MINGW-packages/mingw-w64-python-sphinx-basic-ng/PKGBUILD
2022-07-25 22:59:31 +05:30

39 lines
1.4 KiB
Bash

# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.pro>
_realname=sphinx-basic-ng
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
_pkgver=0.0.1.a12
pkgver=${_pkgver%.*}${_pkgver##*.} # remove last dot
pkgrel=1
pkgdesc='Modernised skeleton for Sphinx themes (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url='https://github.com/pradyunsg/sphinx-basic-ng'
license=('MIT')
depends=("${MINGW_PACKAGE_PREFIX}-python-sphinx")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-wheel")
source=("${_realname}-${_pkgver}.tar.gz::$url/archive/$_pkgver.tar.gz")
sha256sums=('d3ae696bdf5237060e9cf577d0e49d5aac3d0dbca8c8650a2870b6dd5ec4f6b9')
build() {
msg "Python build for ${MSYSTEM}"
cd "${srcdir}"
cp -r "${_realname}-${_pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
msg "Python install for ${MSYSTEM}"
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}