# Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>
# Contributor: Jerome Leclanche <jerome@leclan.ch>
# Contributor: Beej <beej@beej.us>

pkgname=screengrab
pkgver=1.101
pkgrel=1
pkgdesc="Crossplatform tool for grabbing screenshots of your desktop."
arch=("x86_64")
groups=("lxqt")
url="https://github.com/lxqt/screengrab"
license=("GPL2")
depends=("qt5-base" "qt5-x11extras" "kwindowsystem" "libqtxdg" "libx11" "libxcb" "hicolor-icon-theme")
makedepends=("cmake" "qt5-tools")
source=(
  "https://github.com/lxqt/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"{,.asc}
)
sha256sums=('ca1172f5ccd921621a4773854eb424585a6f77d1b697cee369d3c74a650fc815'
            'SKIP')
validpgpkeys=(
  '7C733BA5F585AAD669E4D23A42C9C8D3AF5EA5E3'  # Alf Gaida <agaida@siduction.org>
)

build() {
  mkdir -p build
  cd build
  cmake "$srcdir/$pkgname-$pkgver" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
