summaryrefslogtreecommitdiff
path: root/community/packagekit/PKGBUILD
blob: 2cf1623d59e8427d929612b538513663dd75ced1 (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
# $Id: PKGBUILD 69338 2012-04-14 09:48:38Z jconder $
# Maintainer: Jonathan Conder <jonno.conder@gmail.com>
pkgbase='packagekit'
pkgname=('packagekit' 'packagekit-qt2' 'packagekit-python')
pkgver=0.6.22
pkgrel=1
pkgdesc="A system designed to make installation and updates of packages easier."
arch=('i686' 'x86_64' 'mips64el')
url="http://www.packagekit.org"
license=('GPL')
makedepends=('dbus-glib' 'gobject-introspection' 'gtk-doc' 'intltool'
             'networkmanager' 'pacman'  'pm-utils' 'polkit' 'python2' 'qt'
             'shared-mime-info' 'sqlite' 'udev')
options=('!libtool')
source=("http://www.packagekit.org/releases/PackageKit-$pkgver.tar.xz")
sha256sums=('b9f71721b0b16e106c0a1ce28c97b2277a34b0c15d1a171f4898f34117ebaa2d')

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

  sed -i 's@SUBDIRS = test@SUBDIRS =@' 'backends/Makefile.in'
  sed -i 's@python @python2 @' 'lib/python/packagekit/Makefile.in'
  sed -i 's@bin/python@bin/python2@' 'lib/python/packagekit/'*.py

  export PYTHON=/usr/bin/python2
  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --localstatedir=/var \
              --libexecdir=/usr/lib/PackageKit \
              --enable-strict \
              --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 -s CFLAGS='-D_FILE_OFFSET_BITS=64'
}

package_packagekit() {
  backup=('var/lib/PackageKit/transactions.db'
          'etc/PackageKit/alpm.d/pacman.conf'
          'etc/PackageKit/alpm.d/repos.list')
  depends=('dbus-glib' 'pacman>=4.0.0' 'pacman<4.1.0' 'polkit'
           'shared-mime-info' 'sqlite' 'udev')
  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"*
  rm -rf "$pkgdir/usr/lib/pkgconfig/packagekit-qt"*
  rm -rf "$pkgdir/usr/share/cmake"

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

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

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

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

  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
}