# $Id: PKGBUILD 71879 2012-06-02 18:37:37Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=tilda
pkgver=0.9.6
pkgrel=7
pkgdesc="Linux terminal based on classic terminals from first person shooter games"
arch=('i686' 'x86_64')
url="http://tilda.sourceforge.net"
license=('GPL')
depends=('vte' 'confuse' 'libglade')
makedepends=('gawk')
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
tilda-fix.patch tilda-glib2.patch tilda-conf-sigsegv.patch config_0 tilda_hide.patch )

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

# gdk && desktop file fix FS#25762
  patch -p0 -i ${srcdir}/$pkgname-fix.patch

# glib2 fix
  patch -p0 -i ${srcdir}/$pkgname-glib2.patch

# fix segfaults on malformed config files FS#29754
  patch -p0 -i ${srcdir}/$pkgname-conf-sigsegv.patch

  patch -p0 -i ${srcdir}/tilda_hide.patch
  ./configure --prefix=/usr
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver

  make DESTDIR=${pkgdir} install

  #default config
  install -D -m 0755 $startdir/src/config_0 $startdir/pkg/etc/tilda_config

}
md5sums=('b44ebe04fdfd312e9ddc5e0ed77f4289'
         '6ca2c5ae5acd254b1e89b319b118b8e1'
         'f1fc7009418c2ed7b506d5c555f072cb'
         '3e08a0b2d48bba69cf96bef1faeca429'
         '754753190e0990cd6fba27b3c931bd0e'
         '0cc3020eabc74d939b0b978944d11693')