Files
MINGW-packages/mingw-w64-python-patch-ng/PKGBUILD
Christoph Reiter 942b28fbae repo: make file executable permissions match the cygwin derived status
In case we have a git clone from Linux that is accessed via cygwin git
the files executable status will be derived from the file content (shebang)
and won't match the git repo, leading to a initially dirty tree.

This can be worked around by setting "core.filemode=false", but let's try
to match the cygwin permissions with the in-repo permissions so this isn't
needed.
2024-04-14 14:01:33 +02:00

41 lines
1.4 KiB
Bash

# Maintainer: Joel Holdsworth <jholdsworth@nvidia.com>
_realname=patch-ng
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=1.17.4
pkgrel=2
pkgdesc="Python library to parse and apply unified diffs (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
license=('spdx:MIT')
url="https://github.com/conan-io/python-patch-ng"
msys2_references=(
'pypi: patch-ng'
)
depends=("${MINGW_PACKAGE_PREFIX}-python")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
source=("${_realname}-${pkgver}.tar.gz::https://github.com/conan-io/python-${_realname}/archive/${pkgver}.tar.gz")
sha256sums=('e332ea2c2e64e95b988c6e904a51be65b80560518a9b101c604a1a4378673795')
build() {
msg "Python build for ${MSYSTEM}"
cd "${srcdir}/python-${_realname}-${pkgver}"
${MINGW_PREFIX}/bin/python setup.py build
}
check() {
msg "Python test for ${MSYSTEM}"
cd "${srcdir}/python-${_realname}-${pkgver}"
${MINGW_PREFIX}/bin/python tests/run_tests.py || warning "Tests failed"
}
package() {
cd "${srcdir}/python-${_realname}-${pkgver}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/COPYING"
}