Files
MINGW-packages/mingw-w64-python-protobuf/PKGBUILD
2019-12-01 10:16:37 +01:00

40 lines
1.3 KiB
Bash

# Maintainer: gym603 <gui_yuan_miao@163.com>
_realname=protobuf
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=3.10.1
pkgrel=2
pkgdesc="Protocol Buffers. (mingw-w64)"
arch=('any')
url="https://github.com/protocolbuffers/protobuf"
license=('3-Clause BSD License')
depends=("${MINGW_PACKAGE_PREFIX}-python3"
"${MINGW_PACKAGE_PREFIX}-python3-six"
"${MINGW_PACKAGE_PREFIX}-python3-setuptools")
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools"
"${MINGW_PACKAGE_PREFIX}-protobuf=${pkgver}")
_archive=${_realname/_/-}-${pkgver}
source=(${_archive}.tar.gz::https://github.com/protocolbuffers/protobuf/archive/v${pkgver}.tar.gz)
sha256sums=('6adf73fd7f90409e479d6ac86529ade2d45f50494c5c10f539226693cb8fe4f7')
noextract=(${_archive}.tar.gz)
prepare() {
bsdtar -xf ${_archive}.tar.gz || true
}
build() {
cd "${srcdir}/${_archive}/python"
${MINGW_PREFIX}/bin/python3 setup.py --quiet build
}
package() {
cd "${srcdir}/${_archive}/python"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python3 setup.py --quiet install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1
install -Dm644 ../LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE"
}