summaryrefslogtreecommitdiff
path: root/extra/xfce4-power-manager/PKGBUILD
blob: 265b6f2846b4164cbcc28f05aab4dcdb4561bd1c (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
# $Id: PKGBUILD 198563 2013-10-30 15:37:43Z allan $
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Tobias Kieslich <tobias funnychar archlinux.org>

pkgname=xfce4-power-manager
pkgver=1.2.0
pkgrel=6
pkgdesc="Power manager for Xfce desktop"
arch=('i686' 'x86_64')
url="http://www.xfce.org/"
license=('GPL2')
groups=('xfce4')
depends=('xfce4-panel' 'upower' 'udisks' 'libnotify' 'hicolor-icon-theme')
makedepends=('pkgconfig' 'intltool')
install=$pkgname.install
source=(http://archive.xfce.org/src/apps/$pkgname/1.2/$pkgname-$pkgver.tar.bz2
        xfce4-power-manager-1.2.0-logind-support-for-suspend-hibernate.patch
        xfce4-power-manager-1.2.0-change-brightness-level-from-glong-to-gint32.patch
        xfce4-power-manager-1.2.0-sync-en-gb-translation.patch)
sha256sums=('d7fb98a540284b62f4201527de17d4b24123f9d26c9f49131dd497c8387184e9'
            '4166f61234abfcd385d43b1e7f7ab5b73711bcb7335ef0f6b217ac799dc9266b'
            '689751b6369fd8ade6337713283f5ef3dd40715bbbe69e4a8723c9cbe56e7465'
            'c8e1dfafd685c2abf1fcc2b3682f5b1eb2e7f1d4fa557f11a7478437eef9a933')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"

  # Use logind interfaces for suspend and hibernate
  # https://bugzilla.xfce.org/show_bug.cgi?id=9963
  patch -Np1 -i "$srcdir/xfce4-power-manager-1.2.0-logind-support-for-suspend-hibernate.patch"

  # Fix brightness level handling
  # https://bugzilla.xfce.org/show_bug.cgi?id=8840
  patch -Np1 -i "$srcdir/xfce4-power-manager-1.2.0-change-brightness-level-from-glong-to-gint32.patch"

  # Fix en_GB translation
  # https://bugs.archlinux.org/task/30055
  patch -d po -Np0 -i \
    "$srcdir/xfce4-power-manager-1.2.0-sync-en-gb-translation.patch"
}

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

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --sbindir=/usr/bin \
    --libexecdir=/usr/lib \
    --localstatedir=/var \
    --disable-network-manager \
    --enable-polkit \
    --enable-dpms \
    --disable-debug
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et: