# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=qt5-qttranslations
pkgver=5.6.0
pkgrel=1
pkgdesc="Qt5 - QtTranslations module"
url="http://qt-project.org/"
arch="noarch"
license="LGPLv2 with exceptions or GPLv3 with exceptions and GFDL"
depends=""
depends_dev=""
makedepends="$depends_dev qt5-qttools-dev"
install=""
subpackages=""

_ver=${pkgver/_/-}
_ver=${_ver/beta0/beta}
_ver=${_ver/rc0/rc}
_V=${_ver/rc/RC}
case $pkgver in
*_beta*|*_rc*) _rel=development_releases;;
*) _rel=official_releases;;
esac

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

_builddir="$srcdir"/qttranslations-opensource-src-$_V
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	qmake-qt5 && make || return 1
}

package() {
	cd "$_builddir"
	make install INSTALL_ROOT="$pkgdir" || return 1
}

md5sums="62b3b6191f902466d97e09df48c27534  qttranslations-opensource-src-5.6.0.tar.xz"
sha256sums="9809351f0922b2d91aeb5d8e5756665eea0b2cbcaab74a570f6e5bf08574cd49  qttranslations-opensource-src-5.6.0.tar.xz"
sha512sums="87f363735fa18bb7894cfaba80baa7c7e47bf0d0bc3f639cd794587d23ff8497d6df5c4e3312dd9f59cf1bc7d3a6404a9ac5b101475decf43239adbf398994e1  qttranslations-opensource-src-5.6.0.tar.xz"
