dbus-python: split dbus-python3 into its own srcpkg; dbus-python can be cross compiled now.

This commit is contained in:
Juan RP 2014-01-29 09:42:02 +01:00
parent 4490bd607f
commit 71e47363c7
4 changed files with 35 additions and 40 deletions

View file

@ -1,9 +1,10 @@
# Template file for 'dbus-python' # Template file for 'dbus-python'
pkgname=dbus-python pkgname=dbus-python
version=1.2.0 version=1.2.0
revision=1 revision=2
hostmakedepends="pkg-config" build_style=gnu-configure
makedepends="glib-devel dbus-glib-devel python-devel python3-devel>=3.3.2_2" hostmakedepends="pkg-config python-devel"
makedepends="glib-devel dbus-glib-devel python-devel"
depends="python" depends="python"
pycompile_module="dbus" pycompile_module="dbus"
short_desc="D-Bus Python bindings" short_desc="D-Bus Python bindings"
@ -14,50 +15,23 @@ distfiles="http://dbus.freedesktop.org/releases/$pkgname/$pkgname-$version.tar.g
checksum=e12c6c8b2bf3a9302f75166952cbe41d6b38c3441bbc6767dbd498942316c6df checksum=e12c6c8b2bf3a9302f75166952cbe41d6b38c3441bbc6767dbd498942316c6df
do_configure() { do_configure() {
mkdir build-python2 build-python3 if [ "$CROSS_BUILD" ]; then
# create a python-config wrapper to fake --includes
cd $wrksrc/build-python2 install -m755 ${XBPS_SRCPKGDIR}/py2cairo/files/python-config ${wrksrc}
PYTHON=python2 ../configure --prefix=/usr export PATH=${wrksrc}:$PATH
fi
cd $wrksrc/build-python3 env PYTHON=python ./configure ${configure_args}
PYTHON=python3 ../configure --prefix=/usr
} }
do_build() { post_install() {
cd $wrksrc/build-python2
make ${makejobs}
cd $wrksrc/build-python3
make ${makejobs}
}
do_install() {
cd $wrksrc/build-python2
make DESTDIR=${DESTDIR} install
rm -rf ${DESTDIR}/usr/share/doc rm -rf ${DESTDIR}/usr/share/doc
} }
dbus-python-devel_package() { dbus-python-devel_package() {
depends="python-devel depends="python-devel ${sourcepkg}>=${version}_${revision}"
python3-devel>=3.3.2_2
dbus-python>=${version}
dbus-python3>=${version}"
short_desc+=" - development files" short_desc+=" - development files"
pkg_install() { pkg_install() {
vmove usr/include vmove usr/include
vmove usr/lib/pkgconfig vmove usr/lib/pkgconfig
} }
} }
dbus-python3_package() {
short_desc="D-Bus Python3 bindings"
depends="python3"
pkg_install() {
cd $wrksrc/build-python3
make DESTDIR=${PKGDESTDIR} install
rm -rf ${PKGDESTDIR}/usr/include
rm -rf ${PKGDESTDIR}/usr/lib/pkgconfig
rm -rf ${PKGDESTDIR}/usr/share/doc
}
}

View file

@ -1 +0,0 @@
dbus-python

View file

@ -0,0 +1,22 @@
# Template file for 'dbus-python3'
pkgname=dbus-python3
version=1.2.0
revision=2
wrksrc="${pkgname/3/}-${version}"
build_style=gnu-configure
configure_args="PYTHON=python3"
hostmakedepends="pkg-config python3-devel"
makedepends="glib-devel dbus-glib-devel python3-devel"
depends="python3"
short_desc="D-Bus Python bindings"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2, LGPL-2.1"
homepage="http://www.freedesktop.org/wiki/Software/DBusBindings"
distfiles="http://dbus.freedesktop.org/releases/${pkgname/3/}/${pkgname/3/}-${version}.tar.gz"
checksum=e12c6c8b2bf3a9302f75166952cbe41d6b38c3441bbc6767dbd498942316c6df
post_install() {
rm -rf ${DESTDIR}/usr/share/doc
# Remove development files, provided by dbus-python-devel.
rm -rf ${DESTDIR}/usr/include ${DESTDIR}/usr/lib/pkgconfig
}

View file

@ -6,4 +6,4 @@ if [ "$1" = "--includes" ]; then
echo "-I${XBPS_CROSS_BASE}/usr/include/python2.7" echo "-I${XBPS_CROSS_BASE}/usr/include/python2.7"
fi fi
return 0 exit 0