# Copyright 2023 bill-auger <bill-auger@programmer.net>
# SPDX-License-Identifier: CC0-1.0
# Maintainer: bill-auger <bill-auger@programmer.net>


pkgname=talksoup
_upstream_name=TalkSoup
pkgrel=1
pkgver=1.1
pkgdesc="IRC client for GNUstep"
arch=(armv7h i686 x86_64)
url=http://gap.nongnu.org/talksoup/index.html
license=(GPL2)
depends=(gnustep-netclasses)
makedepends=(gcc-objc gnustep-make)
source=(http://savannah.nongnu.org/download/gap/${_upstream_name}-${pkgver}.tar.gz)
sha256sums=(3a469c66ce3067a88603d6ebae6f63fbcfad55586dd5455179887f28e5a63ae7)


build()
{
  cd ${_upstream_name}-${pkgver}

  export GNUSTEP_MAKEFILES=$(gnustep-config --variable=GNUSTEP_MAKEFILES)

  make
}

package()
{
  cd ${_upstream_name}-${pkgver}

  make DESTDIR="${pkgdir}" install

  cd "${pkgdir}"/usr/lib/GNUstep/Applications/${_upstream_name}.app/Resources/

  # install.desktop file to the standard system location
  install -d "${pkgdir}"/usr/share/applications
  sed -i 's|^Categories=X-GNUstep;|&Network;Chat;IRCClient;|' ${_upstream_name}.desktop
  mv ${_upstream_name}.desktop "${pkgdir}"/usr/share/applications/${pkgname}.desktop
}
