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

pkgname=pcmanfm-qt
pkgver=0.17.0
pkgrel=1
pkgdesc="The LXQt file manager, Qt port of PCManFM"
arch=("x86_64")
groups=("lxqt")
url="https://github.com/lxqt/$pkgname"
license=("GPL2")
depends=("desktop-file-utils" "libfm-qt" "lxmenu-data" "libfm-qt.so")
makedepends=("lxqt-build-tools")
optdepends=(
	"gvfs: for trash support, mounting with udisks, remote filesystems and trust bits for executables"
	"gvfs-mtp: MTP support (Media Transfer Protocol)"
	"lxqt-archiver: archive management"
	"qt5-translations: allow keyboard shortcuts to function in some languages (e.g. German)"
)
source=(
	"https://github.com/lxqt/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"
	"https://github.com/lxqt/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz.asc"
)
sha256sums=('74acbf55cdb22bd4d0068ef22ba298254ce6de72374624fcf3087c016d3bbaab'
            'SKIP')
validpgpkeys=(
	"169704C6FB490C6892C7F23C37E0AF1FDA48F373"  # Jerome Leclanche <jerome@leclan.ch>
	"7C733BA5F585AAD669E4D23A42C9C8D3AF5EA5E3"  # Alf Gaida <agaida@siduction.org>
	"19DFDF3A579BD509DBB572D8BE793007AD22DF7E"  # Pedram Pourang <tsujan2000@gmail.com>
)

build() {
	cmake -B build -S "$srcdir/$pkgname-$pkgver" \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None
	make -C build
}

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