#!/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"
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=gksu
pkgver=2.0.2
pkgrel=07
pkgdesc="A graphical frontend for su"
arch=(x86_64)
url="http://www.nongnu.org/gksu"
depends=("libgksu>=2.0.12" xorg-xauth)
makedepends=(gtk-doc intltool)
source=(https://people.debian.org/~kov/gksu/$pkgname-$pkgver.tar.gz
		gksu-2.0.2-gksu_gksu.c.patch)

prepare() {
  cd $srcdir/$pkgname-$pkgver
  patch -Np1 -i "${srcdir}/gksu-2.0.2-gksu_gksu.c.patch"
}

build() {
  cd "$pkgname-$pkgver"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-static \
		--disable-nautilus-extension
  make
}

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

  make DESTDIR="$pkgdir" install

  rm -rf "$pkgdir/usr/share/applications/"
}

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

license=('GPL')

sha256sums=(a1de3dca039d88c195fcdc9516379439a1d699750417f1e655aa2101a955ee5a # gksu-2.0.2.tar.gz
	1c08658a8946713e1da9d9ae5f808fc87a35661bbb28def1552d4c13e5d46600) # gksu-2.0.2-gksu_gksu.c.patch
