# Maintainer: Natanael Copa pkgname=qt5-qttools pkgver=5.3.0 pkgrel=0 pkgdesc="Qt5 - QtTool components" url="http://qt-project.org/" arch="all" license="LGPLv2 with exceptions or GPLv3 with exceptions" depends="" depends_dev="qt5-qtbase-dev" makedepends="$depends_dev qt5-qtwebkit-dev" install="" subpackages="$pkgname-dev qt5-assistant:_assistant qt5-qdbusviewer:_dbusviewer qt5-designer-plugin-webkit:_webkit" _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/qttools-opensource-src-$_V.tar.xz assistant.desktop designer.desktop linguist.desktop qdbusviewer.desktop " _builddir="$srcdir"/qttools-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 && make || return 1 } package() { cd "$_builddir" make install INSTALL_ROOT="$pkgdir" || return 1 rm "$pkgdir"/usr/lib/*.la || return 1 for i in $source; do case $i in *.desktop) install -Dm644 "$srcdir"/$i \ "$pkgdir"/usr/share/applications/$i || return 1;; esac done # icons install -m644 -p -D src/assistant/assistant/images/assistant.png \ "$pkgdir"/usr/share/icons/hicolor/32x32/apps/assistant-qt5.png \ || return 1 install -m644 -p -D src/assistant/assistant/images/assistant-128.png \ "$pkgdir"/usr/share/icons/hicolor/128x128/apps/assistant-qt5.png\ || return 1 install -m644 -p -D src/designer/src/designer/images/designer.png \ "$pkgdir"/usr/share/icons/hicolor/32x32/apps/designer-qt5.png \ || return 1 install -m644 -p -D src/qdbus/qdbusviewer/images/qdbusviewer.png \ "$pkgdir"/usr/share/icons/hicolor/32x32/apps/qdbusviewer-qt5.png \ || return 1 install -m644 -p -D src/qdbus/qdbusviewer/images/qdbusviewer-128.png \ "$pkgdir"/usr/share/icons/hicolor/128x128/apps/qdbusviewer-qt5.png \ || return 1 # linguist icons for icon in src/linguist/linguist/images/icons/linguist-*-32.png ; do size=$(echo ${icon##*/} | cut -d- -f2) install -p -m644 -D ${icon} \ "$pkgdir"/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png || return 1 done } _mv_files() { local i for i in "$@"; do mkdir -p "$subpkgdir"/${i%/*} mv "$pkgdir"/$i "$subpkgdir"/$i || return 1 done } dev() { default_dev cd "$pkgdir" _mv_files \ usr/bin/designer \ usr/bin/lconvert \ usr/bin/linguist \ usr/bin/lrelease \ usr/bin/lupdate \ usr/bin/pixeltool \ usr/bin/qcollectiongenerator \ usr/bin/qhelpconverter \ usr/bin/qhelpgenerator \ usr/share/applications/designer* \ usr/share/applications/linguist* \ usr/share/icons/hicolor/*/apps/designer* \ usr/share/icons/hicolor/*/apps/linguist* \ || return 1 } _assistant() { pkgdesc="Documentation browser for Qt5" cd "$pkgdir" _mv_files usr/bin/assist* \ usr/share/applications/*assistant* \ usr/share/icons/hicolor/*/apps/assistant* \ || return 1 } _dbusviewer() { pkgdesc="D-Bus debugger and viewer" cd "$pkgdir" _mv_files usr/bin/qdbusviewer* \ usr/share/applications/qdbusviewer* \ usr/share/icons/hicolor/*/apps/qdbusviewer* \ || return 1 } _webkit() { pkgdesc="Qt5 designer plugin for WebKit" cd "$pkgdir" _mv_files usr/lib/qt5/plugins/designer/libqwebview.so || return 1 } md5sums="628a91ddfe34efc6622fdba8c6348855 qttools-opensource-src-5.3.0.tar.xz a445c6917086d80f1cfc1e40cb6b0132 assistant.desktop d457f0a0ad68a3861c3cadefe3b42ded designer.desktop 668331d9798a0e2b94381efb7be4c513 linguist.desktop 60f6c5d2e7551790665d35778d1640f3 qdbusviewer.desktop" sha256sums="f64d2ca5dc59ab8980987649bcef4597a7c0194e802e64d93448cac892fd8250 qttools-opensource-src-5.3.0.tar.xz 1094300e3d69e55eb69d87cbaac6724f68b0618938c6eb1b0ddd22ba99c7f8a2 assistant.desktop 74c2c5d27a1c1ad08ab01122bcf333f75d0a014b4755d3ddd8764c2425f6e320 designer.desktop 1b9ecd839c1a5dfcec87653849287c31bf2f4044300958be802ebb943e896998 linguist.desktop 3da411f79ddc788a6b892ba1d61c0175c629e6e53fb9591a3cb12e4c6d983ac8 qdbusviewer.desktop" sha512sums="f52a10fc96ca3ea71800cbdb10b8166e819fd4008f1dfec984ea437b626240b2a32fa32ab7b60561acf785996d01bf5d0c5659e05bac3f6e05c7a34da06de63c qttools-opensource-src-5.3.0.tar.xz 005ed6fe50b237e4541c0f30cbd87ec5425eff7e7c8d55d2b9b24ea8469e75e1fc8a3f26296841ab4cbd566517b3f1aa1fa7b36e1a9677d284cfff615fd24614 assistant.desktop 731aae6a0d776c1be5a49dadc5480b205ba5c8e056d108e2bb96a19dd52b6c6ca22387b37505cf97a2575228cd5dd65c773d0fde1c26299e47fdc11a49f651fd designer.desktop 70943d9ee9ac7ff6281079be14b741095c60428b30b27bafc42a8bb1729a6f7e8e163cff3d2b5d5a66bbdab464816eea479a3f822598ff2fe068d4025652a049 linguist.desktop 46880915dabb1d0e6bc870460cb86ec1b8f4678bda5c1001903281545e8c33752619cbda25d955436f2facedbc0890ebb1c9e71dfe2bd60f1bebfafe68085cd6 qdbusviewer.desktop"