# Maintainer: pkgname=hexchat pkgver=2.14.1 pkgrel=0 pkgdesc="Popular and easy to use graphical IRC (chat) client" url="https://hexchat.github.io" arch="all" license="GPL-2.0+" depends="" makedepends="dbus-glib-dev glib-dev gtk+2.0-dev iso-codes-dev libcanberra-dev libnotify-dev libproxy-dev libsexy-dev meson ninja openssl-dev perl-dev pciutils-dev python3-dev" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-perl:_perl $pkgname-py:_python" source="https://dl.hexchat.net/hexchat/hexchat-$pkgver.tar.xz" prepare() { cd "$builddir" default_prepare mkdir -p _build } build() { cd "$builddir"/_build meson -Dprefix=/usr -Dwith-lua=false ninja } check() { cd "$builddir"/_build ninja test } package() { cd "$builddir"/_build DESTDIR="$pkgdir" ninja install } _perl() { pkgdesc="Perl plugin for HexChat" depends="$pkgname=$pkgver-r$pkgrel" install_if="$pkgname=$pkgver-r$pkgrel perl" mkdir -p "$subpkgdir"/usr/lib/hexchat/plugins mv "$pkgdir"/usr/lib/hexchat/plugins/perl.so \ "$subpkgdir"/usr/lib/hexchat/plugins } _python() { pkgdesc="Python plugin for HexChat" depends="$pkgname=$pkgver-r$pkgrel" install_if="$pkgname=$pkgver-r$pkgrel perl3" mkdir -p "$subpkgdir"/usr/lib/hexchat/plugins mv "$pkgdir"/usr/lib/hexchat/plugins/python.so \ "$subpkgdir"/usr/lib/hexchat/plugins } sha512sums="2728d6f084530c1a65ddb7960db6574fef2bca77e726a2155c8b5724256f37b47421e990b1bf7c9fad7987027b2f6de4534a8df28a98cb3d28da726e16ac32dd hexchat-2.14.1.tar.xz"