pkgname=luna-app-browser
pkgver=8.0.0_git20171004
pkgrel=2
_commit=7e7a8f477039483c3a05f53a2eb980884560dc32
pkgdesc="LuneOS web browser"
arch="all"
url="http://webos-ports.org"
license="GPL-3.0+"
depends="qt5-qtquickcontrols2 qt5-qtquickcontrols qt5-qtwebengine"
makedepends="cmake-modules-webos qt5-qtquickcontrols2-dev qt5-qtwebengine-dev"
source="$pkgname-$_commit.tar.gz::https://github.com/webOS-ports/org.webosports.app.browser/archive/$_commit.tar.gz
fix-qtwebengine-private-includes.patch"
builddir="$srcdir/org.webosports.app.browser-$_commit"

build() {
	mkdir -p "$srcdir"/build
	cd "$srcdir"/build
	cmake "$builddir" \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DWEBOS_INSTALL_ROOT=/
	make
}

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

	install -d "$pkgdir"/etc/palm/db/kinds
	install -d "$pkgdir"/etc/palm/db/permissions
	install -v -m644 "$builddir"/configuration/db/kinds/* "$pkgdir"/etc/palm/db/kinds
	install -v -m644 "$builddir"/configuration/db/permissions/* "$pkgdir"/etc/palm/db/permissions
}
sha512sums="e12b6061bd36a87cf836415f99653c533edb3eb6f25947d983d03a21faad7de8874638923071842103373682c2060459a86eb895ac6e212156eaf9d01aa654f2  luna-app-browser-7e7a8f477039483c3a05f53a2eb980884560dc32.tar.gz
1a764b7d091878c6702e7e24178907fc9b48512be4bcb334e1cba57c4aad26650806190bdd916d67a25c0e95bd69075ba6012eb984f9192f6af8c0e8e1555f47  fix-qtwebengine-private-includes.patch"
