summaryrefslogtreecommitdiff
path: root/community/packagekit/PKGBUILD
blob: 410da5d19628b78fa86b228b3b4bf2f65f2ee639 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# $Id: PKGBUILD 43963 2011-04-01 10:59:14Z jconder $
# Maintainer: Jonathan Conder <jonno.conder@gmail.com>
pkgbase='packagekit'
pkgname=('packagekit' 'packagekit-qt' 'packagekit-python')
pkgver=0.6.13
pkgrel=2
pkgdesc="A system designed to make installation and updates of packages easier."
arch=('i686' 'x86_64')
url="http://www.packagekit.org"
license=('GPL')
makedepends=('dbus-glib' 'gobject-introspection' 'gtk-doc' 'intltool'
             'networkmanager' 'pacman'  'pm-utils' 'polkit' 'python2' 'qt'
	     'sqlite3')
options=('!libtool')
source=("http://www.packagekit.org/releases/PackageKit-$pkgver.tar.bz2"
        'alpm.patch')
sha256sums=('cec67a54cd615163402b1e5100a6a9be0bd1838896d6183407b4d9274de47249'
            '777b1cda90f8cc78eb5cf651d47b5c7b6f183a34b98ad0d93945c76973bd29de')

build() {
  cd "$srcdir/PackageKit-$pkgver"

  patch -Np1 -i "$srcdir/alpm.patch"

  # TODO: change to Makefile.in's and configure
  sed -i 's@SUBDIRS = test@SUBDIRS =@' 'backends/Makefile.am'
  sed -i 's@python @python2 @' 'lib/python/packagekit/Makefile.am'

  export PYTHON=/usr/bin/python2
  ./autogen.sh --prefix=/usr \
	      --sysconfdir=/etc \
	      --localstatedir=/var \
	      --libexecdir=/usr/lib/PackageKit \
	      --disable-static \
	      --disable-gtk-doc \
	      --disable-tests \
	      --disable-local \
	      --disable-browser-plugin \
	      --disable-gstreamer-plugin \
	      --disable-gtk-module \
	      --disable-command-not-found \
	      --disable-cron \
	      --disable-debuginfo-install \
	      --enable-pm-utils \
	      --disable-dummy \
	      --enable-alpm \
	      --with-default-backend=alpm
  make
}

package_packagekit() {
  backup=('var/lib/PackageKit/transactions.db'
          'etc/PackageKit/alpm.d/pacman.conf'
          'etc/PackageKit/alpm.d/repos.list')
  depends=('dbus-glib' 'pacman>=3.5.0' 'pacman<3.6.0' 'polkit'
           'shared-mime-info' 'sqlite3')
  optdepends=('networkmanager')
  install='packagekit.install'

  cd "$srcdir/PackageKit-$pkgver"

  make DESTDIR="$pkgdir" install

  rm -rf "$pkgdir/usr/include/PackageKit/packagekit-qt"
  rm -rf "$pkgdir/usr/lib/libpackagekit-qt.so"*
  rm -rf "$pkgdir/usr/lib/pkgconfig/packagekit-qt.pc"
  rm -rf "$pkgdir/usr/share/cmake"

  rm -rf "$pkgdir/usr/lib/python"*
  rm -rf "$pkgdir/usr/share/PackageKit/website"

  mv "$pkgdir/etc/bash_completion.d/pk-completion.bash" \
     "$pkgdir/etc/bash_completion.d/pkcon"
  touch "$pkgdir/var/log/PackageKit"
}

package_packagekit-qt() {
  depends=('packagekit' 'qt')
  pkgdesc=('Qt bindings for PackageKit')

  cd "$srcdir/PackageKit-$pkgver/lib/packagekit-qt"

  make DESTDIR="$pkgdir" install
}

package_packagekit-python() {
  depends=('packagekit' 'python2')
  pkgdesc=('Python bindings for PackageKit')

  cd "$srcdir/PackageKit-$pkgver/lib/python"

  make DESTDIR="$pkgdir" install
}