void-packages/srcpkgs/python-gobject/template

66 lines
1.7 KiB
Bash

# Template file for 'python-gobject'
pkgname=python-gobject
version=3.30.2
revision=1
wrksrc="pygobject-${version}"
pycompile_module="gi pygtkcompat"
hostmakedepends="gobject-introspection meson pkg-config"
makedepends="libglib-devel python-cairo-devel python3-cairo-devel"
depends="gir-freedesktop python-cairo"
short_desc="Python2 bindings for GObject"
maintainer="Enno Boland <gottox@voidlinux.eu>"
license="LGPL-2.1-or-later"
homepage="https://pygobject.readthedocs.io/"
distfiles="${GNOME_SITE}/pygobject/${version%.*}/pygobject-${version}.tar.xz"
checksum=a4fc3523c4c1bb3d59e01d182fa50d9fb17db9896d86e68e470468390827ed97
# Also, we don't do any meson cross specific stuff here
nocross="http://build.voidlinux.eu/builders/armv7l_builder/builds/8676/steps/shell_3/logs/stdio"
pre_configure() {
mkdir -p gi-${py2_ver}
mv * gi-${py2_ver} || true
cp -a gi-${py2_ver} gi-${py3_ver}
}
do_configure() {
for pyver in $py2_ver $py3_ver; do
cd ${wrksrc}/gi-${pyver}
meson --prefix=/usr --buildtype=plain -Dpython=python${pyver} . build
done
}
do_build() {
for pyver in $py2_ver $py3_ver; do
cd ${wrksrc}/gi-${pyver}
ninja -C build ${makejobs}
done
}
do_install() {
for pyver in $py2_ver $py3_ver; do
cd ${wrksrc}/gi-${pyver}
DESTDIR=${DESTDIR} ninja -C build install
done
}
python3-gobject_package() {
pycompile_module="gi pygtkcompat"
depends="gir-freedesktop python3-cairo"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove ${py3_sitelib}
}
}
python-gobject-devel_package() {
depends="libgirepository-devel python-cairo-devel python3-cairo-devel
python-gobject>=${version}_${revision}
python3-gobject>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
}
}