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

pkgname=libfm-qt
pkgver=0.17.1
pkgrel=1
pkgdesc="Core library of PCManFM-Qt (Qt binding for libfm)"
arch=("x86_64")
url="https://github.com/lxqt/$pkgname"
license=("LGPL2.1")
depends=("menu-cache" "libexif" "qt5-x11extras")
makedepends=("lxqt-build-tools")
optdepends=(
  "org.freedesktop.secrets: allow to remember mount passwords"
)
provides=("libfm-qt.so")
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"
)
sha512sums=('1e1781a01446f381625361a50f77422827e7ac5ab6039b4246369e2281edf78d3ccba866fa472667bcbb6737c44ebc350cb30a0055fc84d1f5d7e1c83e1241c1'
            '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
}
