# Maintainer: Natanael Copa pkgname=qt5-qtdeclarative pkgver=5.4.2 _ver=${pkgver/_/-} _ver=${_ver/beta0/beta} _ver=${_ver/rc0/rc} _V=${_ver/rc/RC} pkgrel=0 pkgdesc="Qt5 - QtDeclarative component" url="http://qt-project.org/" arch="all" license="LGPLv2 with exceptions or GPLv3 with exceptions" depends="" depends_dev="" makedepends="$depends_dev qt5-qtbase-dev" install="" subpackages="$pkgname-dev" case $pkgver in *_beta*|*_rc*) _rel=development_releases;; *) _rel=official_releases;; esac source="http://download.qt-project.org/$_rel/qt/${pkgver%.*}/$_ver/submodules/qtdeclarative-opensource-src-$_V.tar.xz" _qt5_prefix=/usr/lib/qt5 _builddir="$srcdir"/qtdeclarative-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 mkdir -p "$pkgdir"/usr/bin/ for i in "$pkgdir"/$_qt5_prefix/bin/*; do ln -s ../lib/qt5/bin/${i##*/} "$pkgdir"/usr/bin/${i##*/}-qt5 || return 1 done } md5sums="5b257cd097c315dab1b3c15e26211823 qtdeclarative-opensource-src-5.4.2.tar.xz" sha256sums="b73021d78fffe7894c5fde998a767a866b09811c7e210f8e46f252a32be741ae qtdeclarative-opensource-src-5.4.2.tar.xz" sha512sums="be8b28dfafc20364e0056739f94432750493372b423f2351715d1ec0942cee71b36f6a86db5d6f450c291b147a07632dd1573b76601c0d5eb4c2fdaed717bb93 qtdeclarative-opensource-src-5.4.2.tar.xz"