# Maintainer: Developer <dev@opalos.org>
# Maintainer: Developer <dev@opalos.org>

pkgname=irssi
pkgver=%version%
pkgrel=%release%
pkgdesc='Modular text mode IRC client with Perl scripting'
url='https://irssi.org/'
arch=('x86_64')
license=('GPL')
depends=('glibc' 'glib2' 'openssl' 'libotr' 'perl' 'ncurses' 'libncursesw.so')
makedepends=('git' 'meson' 'ninja')
optdepends=('perl-lwp-protocol-https: for the scriptassist script')
replaces=('irssi-otr')
backup=('etc/irssi.conf')
source=(git+https://github.com/irssi/irssi.git#tag=${pkgver})
#source=(https://github.com/irssi/irssi/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz{,.asc})
sha512sums=('c9273d79543af66ec3d32e87b5b3ed76ddfb415dbe50cd4eb93200eebe941d7a090c3a22e7c8af42c90d7c66e699d6fa7b4ddf5e6bab2e6dff6afca6db1d05e0')
#validpgpkeys=('7EE65E3082A5FB06AC7C368D00CCB587DDBEF0E1') # The Irssi project <staff@irssi.org>

build() {
  cd ${pkgname}
  arch-meson Build \
    -Dwith-perl-lib=vendor \
    -Dwith-proxy=yes \
    -Dwith-otr=yes \
    -Dwith-perl=yes \
    -Denable-true-color=yes
  ninja -C Build
}

package() {
  cd ${pkgname}
  DESTDIR="${pkgdir}" ninja -C Build install
  install -Dm 644 irssi.conf "${pkgdir}"/etc/irssi.conf
}

# vim: ts=2 sw=2 et:
