# Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>

pkgname=lxqt-archiver
pkgver=0.4.0
pkgrel=1
pkgdesc="A simple & lightweight desktop-agnostic Qt file archiver"
arch=("x86_64")
groups=("lxqt")
url="https://github.com/lxqt/$pkgname"
license=("GPL2")
depends=('libfm-qt' 'qt5-x11extras' 'glib2' 'json-glib' 'libfm-qt.so')
makedepends=('cmake' 'qt5-tools' 'lxqt-build-tools')
optdepends=(
  'libarchive: for handling rpm files'
)
source=("https://github.com/lxqt/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"{,.asc})
sha256sums=('9f8c00b517771d99ceaf05ff7d72609580def47aae13842b461d9eecd9c1ef3b'
            'SKIP')
validpgpkeys=(
  "19DFDF3A579BD509DBB572D8BE793007AD22DF7E"  # Pedram Pourang <tsujan2000@gmail.com>
)

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBEXECDIR=lib

  make -C build
}

package() {
  cd build

  make DESTDIR="$pkgdir" install
}
