# $Id: PKGBUILD 118665 2014-09-08 14:41:47Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Henrique C. Alves <hcarvalhoalves@gmail.com>

pkgname=matchbox-panel
pkgver=2.0
pkgrel=1
pkgdesc="A flexible always present 'window bar' for holding application launchers and small 'applet' style applications"
arch=('i686' 'x86_64')
license=('GPL')
depends=('libmatchbox' 'startup-notification' 'libpng' 'gtk2' 'dbus-glib')
url="http://matchbox-project.org/"
source=(http://downloads.yoctoproject.org/releases/matchbox/matchbox-panel/2.0/matchbox-panel-$pkgver.tar.bz2)
md5sums=('87faf3b9299a9d04056904e6f311ec80')

prepare() {
  cd $srcdir/$pkgname-$pkgver
  find -type f -name 'Makefile*' -exec sed -i 's|-Werror||g' {} \;
  sed -i 's|sync |xsync |g' applets/showdesktop/showdesktop.c
}

build() {
  cd $srcdir/$pkgname-$pkgver
  export LDFLAGS=-lX11
  ./configure --sysconfdir=/etc --prefix=/usr \
    --enable-startup-notification
  make
}

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