# Maintainer: Natanael Copa pkgname=qt5-qttools pkgver=5.5.0 pkgrel=1 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-qt5.desktop designer-qt5.desktop linguist-qt5.desktop qdbusviewer-qt5.desktop " _qt5_prefix=/usr/lib/qt5 _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-qt5 && make || return 1 } package() { cd "$_builddir" make install INSTALL_ROOT="$pkgdir" || return 1 # -qt5 symlinks 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 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" for i in designer lconvert linguist lrelease lupdate pixeltool \ qcollectiongenerator qhelpconverter qhelpgenerator; do _mv_files $_qt5_prefix/bin/$i usr/bin/$i-qt5 || return 1 done _mv_files \ 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* \ $_qt5_prefix/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* \ $_qt5_prefix/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="2057ef2110b6a1aec260a69e2860a502 qttools-opensource-src-5.5.0.tar.xz 170406f4c24e460fa66026ea1939ba99 assistant-qt5.desktop 253c2ea204c554ac1b43ef9a1075f28e designer-qt5.desktop 1d95ed135d5ecd4940cc81ec97b1e2e0 linguist-qt5.desktop fb13f14e8ef2bb4d3b7bfc1cfd2bb6cb qdbusviewer-qt5.desktop" sha256sums="5b65147187fb7f4456c20ef263f1093709d728f737d6d871a9a5888132fac07d qttools-opensource-src-5.5.0.tar.xz 6e8c9b4ac3439cc4baf86ec113a974ba53139d31d540c420851aa4d839bff471 assistant-qt5.desktop 7f0e06e543691a3750f9d1b9035b8e296da5ba71d1898e5491a2af03a6f001a0 designer-qt5.desktop 278db0fa96792613337ae1a767f3cef508d137ba3749e73edb025207a4b64588 linguist-qt5.desktop c352b569baf6aabf18dd27ede727a1519037b5038ac3db336bbf4ebfcfbe6f33 qdbusviewer-qt5.desktop" sha512sums="801969c68a943ebfc8658c77e799102cd00cb9be1a9b7b1ed033b4fe5b573bac5866d48571f1de27790437fd59950ebacd538109f9249ea1c3c5a991e716be6b qttools-opensource-src-5.5.0.tar.xz d566c5284854855541df7177b23f491d96f5064b571e899a44f1d4fcf8bbf1223590b05b1954278dc6f3f56341c917f5b846594c5bd2215b6a859224038d8ad2 assistant-qt5.desktop 72d9a2235a60c4ae05ba8395d473fe0b42c12e584da619dadb112eb67ba33a85fe0dab6c185d98112d7b25d3eeacaf02f7ef4731742e50c17eacc54c383661b3 designer-qt5.desktop b6d8a672d19eed39ab868ff6fc880f255da94acb9e1e84f5905c0f3b9b6055547e8a706492973692c06dc23d35ce77622fc13efc11adf21b62c3baf4ef5ab2ad linguist-qt5.desktop dddcc8c945dcbaf834e8aa8f42fd6df8d6e257e673a256cfd4affed7caf119502dffe6864262d353e8c2e234296cd091279f120ab9502f1b323e20ae3c3dc709 qdbusviewer-qt5.desktop"