summaryrefslogtreecommitdiff
path: root/community/gnome-applets/PKGBUILD
blob: 193c879af0475ac6d54ca87736503b261e8651ae (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
# $Id: PKGBUILD 88683 2013-04-21 22:16:53Z heftig $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-applets
pkgver=3.5.92
pkgrel=3
pkgdesc="Small applications for the GNOME panel"
arch=('i686' 'x86_64')
license=('GPL')
depends=('cpupower' 'gucharmap' 'gstreamer0.10-base-plugins' 'gnome-panel' 'libgtop' 'upower')
makedepends=('gnome-common' 'gnome-doc-utils' 'intltool' 'networkmanager' 'rarian')
url="https://live.gnome.org/GnomeApplets"
install=$pkgname.install
source=(http://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
        gnome-applets-cpupower.patch
        disable-gweather-applet.patch
        fix-autoconf.patch
        01_battstat_upower.patch)
sha256sums=('f6178cb702a39a4103fcb97e9a266bf6d05f05ac5064818f119c023d76170e83'
            '942276d7cc18224d9f5b1b57314746ad4d713ee0dcf4aedb25fa72e92db75e65'
            '47f6b477c0f76ebb1e8ffc6fe9bd2fac9ac7f511f059cf4bb2687f8425bfb4a8'
            '0acd58aee458345e378d5f77256e04b13e3a4c06b166aac390a92309b864e8a4'
            '364c9264c76721b42e85eecc48443852ead1bd730d9de937dd2ae00889db836a')

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

  sed -i 's@^#!.*python$@#!/usr/bin/python2@' invest-applet/invest/*

  # Use cpupower instead of cpufreq
  patch -Np1 -i "$srcdir/gnome-applets-cpupower.patch"

  # Add UPower support
  patch -Np1 -i "$srcdir/01_battstat_upower.patch"

  # Disable gweather applet, because it's not compatible with libgweather 3.8
  patch -Np1 -i "$srcdir/disable-gweather-applet.patch"

  # Fix build
  patch -Np1 -i "$srcdir/fix-autoconf.patch"

  # Turn off unneeded warnings
  CFLAGS="$CFLAGS -w"

  autoreconf -fi
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgname \
              --disable-static --disable-schemas-install --disable-scrollkeeper \
              --enable-mixer-applet \
              PYTHON=/usr/bin/python2
  make
}

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

  mkdir -m755 -p "$pkgdir/usr/share/gconf/schemas"
  gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$pkgname.schemas" "$pkgdir"/etc/gconf/schemas/*.schemas
  rm -r "$pkgdir"/etc/gconf
}