Files
MSYS2-packages/python-pyalpm/PKGBUILD
2020-04-16 19:46:15 +03:00

56 lines
1.6 KiB
Bash

# Maintainer: Ray Donnelly <mingw.android@gmail.com>
_realname=pyalpm
pkgbase="python-${_realname}"
pkgname=("python-${_realname}")
pkgver=0.9.1
pkgrel=2
pkgdesc="Libalpm bindings for Python"
arch=('i686' 'x86_64')
license=('GPL')
url="https://git.archlinux.org/pyalpm.git/"
depends=("python" "libarchive-devel")
makedepends=('gettext-devel'
'heimdal-devel'
'libarchive-devel'
'libcurl-devel'
'libgpgme-devel'
'pacman')
provides=("python3-${_realname}")
conflicts=("python3-${_realname}")
replaces=("python3-${_realname}")
source=("git+https://git.archlinux.org/pyalpm.git#commit=067d641c2427b6beab5ca48170635748b282f80f"
"0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch")
sha256sums=('SKIP'
'f6954a6532bdc61f8149e5e98b13cadfdfcebff0d6c266408faec41428ab5eb9')
prepare() {
cd "${srcdir}/${_realname}"
patch -p1 -i "${srcdir}"/0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch
# The git repo uses symlinks in the scripts folder to
# the actual source files in the pycman folder. Patch
# files created by git will therefore not contain any
# changes to the files in scripts so copy the patched
# ones across now.
pushd "${srcdir}"/${_realname}
for _file in deptest query remove sync upgrade version; do
cp -f pycman/action_${_file}.py scripts/pycman-${_file}
done
popd
}
build() {
cd "${srcdir}/${_realname}"
LIBALPM_STATIC=1 \
/usr/bin/python setup.py build
}
package() {
cd "${srcdir}/${_realname}"
/usr/bin/python setup.py install --prefix=/usr --root="${pkgdir}" -O1
}