# $Id: PKGBUILD 145543 2015-11-02 05:41:30Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=sensors-applet
pkgver=3.0.0
pkgrel=5
pkgdesc="Applet for GNOME Panel to display readings from hardware sensors, including CPU temperature, fan speeds and voltage readings"
arch=('i686' 'x86_64')
url="http://sensors-applet.sourceforge.net/"
license=('GPL')
depends=('gnome-panel' 'libatasmart' 'lm_sensors')
makedepends=('git' 'gnome-common' 'intltool' 'libxnvctrl' 'yelp-tools')
optdepends=('hddtemp: get HDD temperatures'
            'udisks: get HDD temperatures')
install=$pkgname.install
source=(sensors-applet::git://git.code.sf.net/p/sensors-applet/code#commit=f371e458
        0001-Fix-help-file-installation.patch)
md5sums=('SKIP'
         'ed283a9bd1ad8021b83cb1d5aa218f70')

prepare() {
  cd $pkgname
  # Fix help file installation
  patch -Np1 -i ../0001-Fix-help-file-installation.patch
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgname
  make
}

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