#!/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		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=pidgin-mini-nodbus
pkgdesc="A minimal version of Pidgin for sane XMPP / IRC users no logind no dbus required"
pkgver=2.14.8
pkgrel=02
url="http://pidgin.im/"
options=('!libtool')
makedepends=('ca-certificates' 'python' )
source=(https://downloads.sourceforge.net/pidgin/pidgin-${pkgver}.tar.bz2)


build() {
  cd "$srcdir/pidgin-$pkgver"

  ./configure --prefix=/usr --sysconfdir=/etc --disable-schemas-install \
    --disable-meanwhile --disable-sm --disable-nm --disable-perl --disable-gnutls \
    --disable-doxygen --disable-gtkspell --disable-gestures --disable-dbus --disable-dbus-glib \
    --disable-consoleui --disable-tk --disable-tcl --disable-avahi \
    --disable-gstreamer --disable-farstream --disable-idn --disable-mono \
    --disable-vv --disable-nls --with-dynamic-prpls=jabber,irc \
    --disable-gevolution --with-system-ssl-certs=/etc/ssl/certs
  make
 }

 package() {
  cd "$srcdir/pidgin-$pkgver"
  make DESTDIR="$pkgdir" install
  sed -e 's/_//g' pidgin/data/pidgin.desktop.in > pidgin.desktop
  install -Dm644 pidgin.desktop "$pkgdir"/usr/share/applications/pidgin.desktop

  # Remove GConf schema file
  rm -rf "$pkgdir/etc"

  # Remove libpurple and pidgin development headers
  rm -rf "$pkgdir/usr/include"

  # Remove pkgconfig scripts
  rm -rf "$pkgdir/usr/lib/pkgconfig"

  # Remove libpurple aclocal macro file
  rm -rf "$pkgdir/usr/share/aclocal"
}

arch=('i686' 'x86_64')

depends=('gtk2' 'startup-notification' 'libxss' 'nss' 'hicolor-icon-theme')
# you can add dbus dbus-glib here and remove /.configure --disable-dbus --disable-dbus-glib

provides=("pidgin" "libpurple")

conflicts=('pidgin' 'libpurple' 'pidgin-mini')

post_install() {
  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
  libtool --finish /usr/lib/pidgin
}

post_upgrade() {
  post_install
}

post_remove() {
  post_install
}


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

license=('GPL')

sha512sums=('23975501b07d14829edab7b92628703962d7a8f90849b303e2a765ec6e47d1fcbdeff62539811e26682e300a2f94520193369844de3b1c0e87f99721ca0255e6') #  pidgin-2.14.8.tar.bz2

