# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=nemo-qml-plugin-devicelock
pkgver=0.3.7
pkgrel=2
pkgdesc="Nemo QML devicelock plugin"
url="https://github.com/sailfishos/nemo-qml-plugin-devicelock"
arch="all !armhf" # nemo-qml-plugin-dbus
license="BSD-3-Clause"
depends_dev="
	elogind-dev
	nemo-keepalive-dev
	nemo-qml-plugin-dbus-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	"
makedepends="$depends_dev"
subpackages="$pkgname-static $pkgname-dev"
source="https://github.com/sailfishos/nemo-qml-plugin-devicelock/archive/$pkgver/nemo-qml-plugin-devicelock-$pkgver.tar.gz"

build() {
	qmake-qt5 CONFIG+=no_systemd
	make
}

package() {
	INSTALL_ROOT="$pkgdir" make install
	
	mkdir -p "$pkgdir"/usr/share/dbus-1/system.d/
	mv "$pkgdir"/etc/dbus-1/system.d/* "$pkgdir"/usr/share/dbus-1/system.d/
}

sha512sums="
66541cb4a26acda57551e910e233189173b70c7a51391e8e409be220e6ae48aa01b0a7b7dfebd2878c72642db6bbddd7cede0b59204ef7d98accfe4ab1f13210  nemo-qml-plugin-devicelock-0.3.7.tar.gz
"
