* python-winkerberos - 0.7.0 - new package required for python-requests-kerberos This package is part of a sequence that I hope will end at python os-client-config. os-client-config is required by oslotest/ You might have situations where python-request will need to handle kerberos authentication. * Add description and proper home page. OOPS.
112 lines
3.4 KiB
Bash
112 lines
3.4 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=winkerberos
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
pkgver=0.7.0
|
|
pkgrel=1
|
|
pkgdesc="High level interface to SSPI for Kerberos client auth (mingw-w64)"
|
|
arch=('any')
|
|
url='https://github.com/mongodb-labs/winkerbero'
|
|
license=('Apache')
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python2"
|
|
"${MINGW_PACKAGE_PREFIX}-python3"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-sphinx"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-sphinx"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-setuptools")
|
|
#checkdepends=("${MINGW_PACKAGE_PREFIX}-python2-pymongo"
|
|
# "${MINGW_PACKAGE_PREFIX}-python3-pymongo")
|
|
options=('staticlibs' 'strip' '!debug')
|
|
_dtoken="85/b2/c5a66595bb477f1939596d80fa308e357c28abe22d3d6ce6cc2208c324ee"
|
|
source=("https://files.pythonhosted.org/packages/${_dtoken}/winkerberos-0.7.0.zip"
|
|
mingw-fixes.patch)
|
|
sha256sums=('e304c28de838a48206edfe58b8deb5209a3fd8c6a755bd521c1ee6e656b06e27'
|
|
'2a3fe6e90b8ab3ead000e831878e089880d4402a7df7bca8e8615666b78b090d')
|
|
|
|
# Helper macros to help make tasks easier #
|
|
apply_patch_with_msg() {
|
|
for _patch in "$@"
|
|
do
|
|
msg2 "Applying $_patch"
|
|
patch -Nbp1 -i "${srcdir}/$_patch"
|
|
done
|
|
}
|
|
|
|
del_file_exists() {
|
|
for _fname in "$@"
|
|
do
|
|
if [ -f $_fname ]; then
|
|
rm -rf $_fname
|
|
fi
|
|
done
|
|
}
|
|
# =========================================== #
|
|
|
|
prepare() {
|
|
cd "${srcdir}"
|
|
pushd "${_realname}-${pkgver}"
|
|
apply_patch_with_msg mingw-fixes.patch
|
|
popd
|
|
for builddir in python{2,3}-build-${CARCH}; do
|
|
rm -rf ${builddir} | true
|
|
cp -r "${_realname}-${pkgver}" "${builddir}"
|
|
done
|
|
# Set version for setuptools_scm
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
|
|
}
|
|
|
|
build() {
|
|
for pver in {2,3}; do
|
|
msg "Python ${pver} build for ${CARCH}"
|
|
cd "${srcdir}/python${pver}-build-${CARCH}"
|
|
${MINGW_PREFIX}/bin/python${pver} setup.py build
|
|
done
|
|
}
|
|
|
|
#check() {
|
|
# for pver in {2,3}; do
|
|
# msg "Python ${pver} test for ${CARCH}"
|
|
# cd "${srcdir}/python${pver}-build-${CARCH}"
|
|
# ${MINGW_PREFIX}/bin/python${pver} setup.py test
|
|
# done
|
|
#}
|
|
|
|
package_python3-winkerberos() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python3")
|
|
|
|
cd "${srcdir}/python3-build-${CARCH}"
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \
|
|
--root="${pkgdir}" --optimize=1 --skip-build
|
|
|
|
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE"
|
|
}
|
|
|
|
package_python2-winkerberos() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python2")
|
|
|
|
cd "${srcdir}/python2-build-${CARCH}"
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \
|
|
--root="${pkgdir}" --optimize=1 --skip-build
|
|
|
|
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE"
|
|
}
|
|
|
|
package_mingw-w64-i686-python2-winkerberos() {
|
|
package_python2-winkerberos
|
|
}
|
|
|
|
package_mingw-w64-i686-python3-winkerberos() {
|
|
package_python3-winkerberos
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python2-winkerberos() {
|
|
package_python2-winkerberos
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python3-winkerberos() {
|
|
package_python3-winkerberos
|
|
}
|