summaryrefslogtreecommitdiff
path: root/extra/dbus-python/PKGBUILD
blob: e1db5c4c637a2fbe0054ff5c1ac1f6219b3ef111 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# $Id: PKGBUILD 161366 2012-06-10 10:37:10Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgbase=dbus-python
pkgname=('python-dbus' 'python2-dbus' 'python-dbus-common')
pkgver=1.1.0
pkgrel=1
pkgdesc="Python bindings for DBUS"
arch=('i686' 'x86_64')
license=('GPL' 'LGPL')
url="http://www.freedesktop.org/wiki/Software/DBusBindings"
makedepends=('docutils' 'dbus-glib' 'python' 'python2')
options=('!libtool')
source=(http://dbus.freedesktop.org/releases/${pkgbase}/${pkgbase}-${pkgver}.tar.gz)
md5sums=('41a459bbbb5fd92eeebd632623af0bd7')

build() {
  cd "${srcdir}"
  mkdir build-python2 build-python3
  cd "${srcdir}/build-python2"
  PYTHON=python2 ../${pkgbase}-${pkgver}/configure --prefix=/usr
  make


  cd "${srcdir}/build-python3"
  ../${pkgbase}-${pkgver}/configure --prefix=/usr
  make
}

package_python-dbus-common() {
  pkgdesc="Common dbus-python files shared between python-dbus and python2-dbus"

  cd "${srcdir}/build-python3"
  make DESTDIR="${pkgdir}" install-data
  rm -rf "${pkgdir}"/usr/lib/python*
}

package_python-dbus() {
  depends=('python-dbus-common' 'python' 'dbus-core')
  optdepends=('dbus-glib: glib mainloop support')
  pkgdesc="Python 3.2 bindings for DBUS"

  cd "${srcdir}/build-python3"
  make DESTDIR="${pkgdir}" install

  rm -rf "${pkgdir}/usr/share"
  rm -rf "${pkgdir}/usr/include"
  rm -rf "${pkgdir}/usr/lib/pkgconfig"
}

package_python2-dbus() {
  depends=('python-dbus-common' 'python2' 'dbus-core')
  optdepends=('dbus-glib: glib mainloop support')
  pkgdesc="Python 2.7 bindings for DBUS"
  replaces=('dbus-python')
  conflicts=('dbus-python')
  provides=("dbus-python=$pkgver")

  cd "${srcdir}/build-python2"
  make DESTDIR="${pkgdir}" install

  rm -rf "${pkgdir}/usr/share"
  rm -rf "${pkgdir}/usr/include"
  rm -rf "${pkgdir}/usr/lib/pkgconfig"
}