73 lines
1.8 KiB
Bash
73 lines
1.8 KiB
Bash
# Template file for 'python-dbus'
|
|
pkgname=python-dbus
|
|
version=1.2.12
|
|
revision=1
|
|
wrksrc="dbus-python-${version}"
|
|
build_style=gnu-configure
|
|
pycompile_module="dbus"
|
|
hostmakedepends="pkg-config python-devel python3-devel"
|
|
makedepends="libglib-devel ${hostmakedepends/pkg-config/}"
|
|
depends="python dbus"
|
|
short_desc="D-Bus Python2 bindings"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="MIT"
|
|
homepage="https://www.freedesktop.org/wiki/Software/DBusBindings"
|
|
distfiles="https://dbus.freedesktop.org/releases/dbus-python/dbus-python-${version}.tar.gz"
|
|
checksum=cdd4de2c4f5e58f287b12013ed7b41dee81d503c8d0d2397c5bd2fb01badf260
|
|
lib32disabled=yes
|
|
|
|
pre_configure() {
|
|
mkdir -p dbus-${py2_ver}
|
|
mv * dbus-${py2_ver} || true
|
|
cp -a dbus-${py2_ver} dbus-${py3_ver}
|
|
}
|
|
do_configure() {
|
|
local py_abiver=
|
|
for pyver in $py2_ver $py3_ver; do
|
|
if [ "$pyver" != "$py2_ver" ]; then
|
|
py_inc="$py3_inc"
|
|
py_abiver="$py3_abiver"
|
|
else
|
|
py_inc="$py2_inc"
|
|
fi
|
|
|
|
cd ${wrksrc}/dbus-${pyver}
|
|
export PYTHON_CPPFLAGS="-I${XBPS_CROSS_BASE}/${py_inc}"
|
|
export PYTHON_EXTRA_LIBS="-L${XBPS_CROSS_BASE}/usr/lib -lpython${pyver}${py_abiver}"
|
|
export PYTHON_VERSION="${pyver}"
|
|
./configure ${configure_args}
|
|
done
|
|
}
|
|
do_build() {
|
|
for pyver in $py2_ver $py3_ver; do
|
|
cd ${wrksrc}/dbus-${pyver}
|
|
make ${makejobs}
|
|
done
|
|
}
|
|
do_install() {
|
|
for pyver in $py2_ver $py3_ver; do
|
|
cd ${wrksrc}/dbus-${pyver}
|
|
make DESTDIR=${DESTDIR} install
|
|
vlicense COPYING
|
|
done
|
|
}
|
|
|
|
python3-dbus_package() {
|
|
lib32disabled=yes
|
|
pycompile_module="dbus"
|
|
depends="python3 dbus"
|
|
short_desc="${short_desc/Python2/Python3}"
|
|
pkg_install() {
|
|
vmove usr/lib/python3*
|
|
}
|
|
}
|
|
python-dbus-devel_package() {
|
|
depends="python-devel python3-devel
|
|
python-dbus>=${version}_${revision} python3-dbus>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|