# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
setvar pkgname = 'qt5-qtquickcontrols'
setvar pkgver = '5.9.1'
setvar _ver = ${pkgver/_/-}
setvar _ver = ${_ver/beta0/beta}
setvar _ver = ${_ver/rc0/rc}
setvar _V = ${_ver/rc/RC}

setvar pkgrel = '0'
setvar pkgdesc = ""Qt5 - module with set of QtQuick controls""
setvar url = ""http://qt-project.org/""
setvar arch = ""all""
setvar license = ""BSD and (LGPLv2 with exceptions or GPLv3 with exceptions) and GFDL""
setvar depends = """"
setvar depends_dev = ""qt5-qtbase-dev qt5-qtdeclarative-dev""
setvar makedepends = "$depends_dev"
setvar install = """"
setvar subpackages = """"
case (pkgver) {
*_beta*|*_rc* { setvar _rel = 'development_releases'}
* { setvar _rel = 'official_releases'}
}

setvar source = ""http://download.qt-project.org/$_rel/qt/${pkgver%.*}/$_ver/submodules/qtquickcontrols-opensource-src-$_V.tar.xz""

setvar builddir = ""$srcdir"/qtquickcontrols-opensource-src-$_V"
proc prepare {
	local i
	cd $builddir
	for i in $source {
		case (i) {
		*.patch { msg $i; patch -p1 -i "$srcdir"/$i || return 1}
		}
	}
}

proc build {
	cd $builddir
	qmake-qt5 && make || return 1
}

proc package {
	cd $builddir
	make install INSTALL_ROOT="$pkgdir" || return 1
}

setvar sha512sums = ""f7797fe4f5360c814c426ed1db72e58d66a6ad11e9a94f62176736278f7218966032441b8c52fc815f609237bd3483e72023a3407e290b05c2cf9b815ededfe7  qtquickcontrols-opensource-src-5.9.1.tar.xz""