# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=xchm
pkgver=1.32
pkgrel=1
pkgdesc='Viewer for CHM files (GUI front-end to chmlib)'
arch=('x86_64')
url='https://github.com/rzvncj/xCHM'
license=('GPL2')
depends=('chmlib' 'wxgtk3')
source=("https://github.com/rzvncj/xCHM/releases/download/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('b225adf2da99ab26b039d675c446018bb33815f47aae898cf0bc18cb4ef5222c')

prepare() {
  cd $pkgname-$pkgver
  autoreconf -fi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --with-wx-config=/usr/bin/wx-config-gtk3
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
