# Maintainer: Justin Kromlinger <hashworks@archlinux.org>

pkgname=kiwix-desktop
pkgver=2.0.5
pkgrel=1
pkgdesc="Offline reader for Web content, especially intended to make Wikipedia available offline"
url="https://github.com/kiwix/kiwix-desktop"
arch=("x86_64")
license=("GPL3")
depends=("qt5-base" "qt5-webengine" "qt5-svg" "qt5-imageformats" "kiwix-lib>=9.4.1")
makedepends=("qt5-tools")
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('0a72cec66c0b5883aa0e7992cb05ff7bb70362065d51733dd36e3a032b2630a9')

build() {
	cd "${pkgname}-${pkgver}"
	export CFLAGS+=" ${CPPFLAGS}"
	export CXXFLAGS+=" ${CPPFLAGS}"
	qmake PREFIX="/usr"
	make
}

package() {
	cd "${pkgname}-${pkgver}"
	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	make INSTALL_ROOT="$pkgdir/" install
}
