pkgname=luna-webappmanager
pkgver=8.0.0_git20170908
pkgrel=3
_commit=89e9c3e2437c21dcdaced17c7b5df5cc41efd051
pkgdesc="Component responsible for application management in LuneOS"
arch="all"
url="http://webos-ports.org"
license="GPL-3.0+"
depends="glib luna-service2 libpbnjson luna-sysmgr-common luna-prefs qt5-qtbase qt5-qtquickcontrols2 qt5-qtdeclarative qt5-qtwebengine qt5-qtwebchannel libconnman-qt"
makedepends="cmake-modules-webos glib-dev luna-service2-dev libpbnjson-dev luna-sysmgr-common-dev luna-prefs-dev qt5-qtbase-dev qt5-qtquickcontrols2-dev qt5-qtdeclarative-dev qt5-qtwebengine-dev qt5-qtwebchannel-dev libconnman-qt-dev"
source="$pkgname-$_commit.tar.gz::https://github.com/webOS-ports/luna-webappmanager/archive/$_commit.tar.gz
remove-systemd.patch
fix-qtwebengine-private-includes.patch
tryFix.patch"
builddir="$srcdir/$pkgname-$_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
}
sha512sums="12968da4d41954bfb046c161fe15442b3f7a14eaa69a2dedfbfaa0e0af279253c01b7cc5309b42a36af2bfe02545d9ad0f9ac8e1e0a637c28ceec0784951f91b  luna-webappmanager-89e9c3e2437c21dcdaced17c7b5df5cc41efd051.tar.gz
f322799db601cae8fb3e552d495d616927dad45d2381aa1790c83da1afccc4b15713120342975ebe98e9b333e8f4983020d459d91963d87570095cc7c48e00d2  remove-systemd.patch
0a4be526403734f5b9b9c8b80c1ef56bded3ccd48927801cdc8887deaef5bb4aaeccac987c3bd5c17394a18b6755fe8edf0768575eec377049dfb30182f36514  fix-qtwebengine-private-includes.patch
c3c21d3781b5cd96c61e9033bc989d29d342d7a30c1c3e645b2b3cddab13f111523c65591eef505b66159ff9193a92869e15e32d50a99f66411c39c7614ea2ef  tryFix.patch"
