#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website		: http://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=gtkdialog
pkgver=0.8.3
pkgrel=02
pkgdesc="A small utility for fast and easy Gtk2 GUI building w example scripts"
arch=(x86_64)
url="https://code.google.com/p/gtkdialog"
depends=(glade vte-common)
makedepends=(subversion automake autoconf bison flex)
optdepends=('gtkdialog-examples: sample projects - pfeme, pfontview, playmusic')
provides=(gtkdialog)
conflicts=(gtkdialog)
source=("https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/$pkgname/$pkgname-$pkgver.tar.gz"
	"gtkdialog-0.8.3-fno-common.patch::https://gitweb.gentoo.org/repo/gentoo.git/plain/x11-misc/gtkdialog/files/gtkdialog-0.8.3-fno-common.patch?id=98692e4c4ad494b88c4902ca1ab3e6541190bbe8")

prepare() {
  cd $pkgname-$pkgver
  patch -Np1 -b -z .orig < ../gtkdialog-0.8.3-fno-common.patch
}

build() {
  cd $pkgname-$pkgver
  ./autogen.sh --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR=$pkgdir UPDATE_ICON_CACHE=true install
#  rm -f $pkgdir/usr/share/info/dir
  mkdir -p $pkgdir/usr/share/doc/$pkgname
  cp -a examples $pkgdir/usr/share/doc/$pkgname/examples
}

#---- license gpg-key sha256sums ----

license=(GPL)

md5sums=(f8d2a2b912bcd5aa7da60984c19bc493
         34d2362005eea17b0b230b70a6e048ca)

sha256sums=(ff89d2d7f1e6488e5df5f895716ac1d4198c2467a2a5dc1f51ab408a2faec38e #  gtkdialog-0.8.3.tar.gz
	8e22aeb4665fae00138d84d66ef72c0841c808677677d399562078c5b4c44dac) # gtkdialog-0.8.3-fno-common.patch
