archrelease: copy trunk to extra-x86_64
[arch-packages.git] / qt5-tools / trunk / PKGBUILD
blob8b8f4ac21ec2e05af50fb035e5ffb722a5452b85
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Andrea Scarpino <andrea@archlinux.org>
4 pkgname=qt5-tools
5 _basever=5.15.9
6 pkgver=5.15.9+kde+r1
7 pkgrel=1
8 _commit=5649efd376ed7dbb171905e9edebbd547d1f73eb
9 arch=('x86_64')
10 url='https://www.qt.io'
11 license=('GPL3' 'LGPL3' 'FDL' 'custom')
12 pkgdesc='A cross-platform application and UI framework (Development Tools, QtHelp)'
13 depends=('qt5-base' 'hicolor-icon-theme')
14 makedepends=('qt5-declarative' 'vulkan-headers' 'clang' 'git')
15 optdepends=('clang: for qdoc')
16 groups=('qt' 'qt5')
17 conflicts=('qtchooser')
18 _pkgfqn=${pkgname/5-/}
19 source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit
20         {assistant,designer,linguist,qdbusviewer}.desktop)
21 sha256sums=('SKIP'
22             '8092d6d846e39632107b14726fa112862d800e929ef10f05f2a284dbda9b53c4'
23             '92f3e5dc8bc416e02893c38a05287238853e0c20732df1e62d6a672744a34e7c'
24             '15781519115e36d2c67c12ee6bc636425cd445072f43cb8bdd1364cfacbe4c45'
25             '6bc07903971983efb9492700efb2c03e24fbb1ce61b520b6e7d0a04662400701')
27 pkgver() {
28   cd $_pkgfqn
29   echo "$_basever+kde+r"`git rev-list --count v$_basever-lts-lgpl..$_commit` | sed -e 's|+kde+r0||'
32 prepare() {
33   mkdir -p build
36 build() {
37   cd build
39   qmake ../${_pkgfqn} CONFIG+=fat-static-lto
40   make
43 package() {
44   cd build
45   make INSTALL_ROOT="${pkgdir}" install
47   cd ../${_pkgfqn}
48   # install missing icons and desktop files
49   for icon in src/linguist/linguist/images/icons/linguist-*-32.png ; do
50     size=$(echo $(basename ${icon}) | cut -d- -f2)
51     install -p -D -m644 ${icon} \
52       "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png"
53   done
55   install -D -m644 src/assistant/assistant/images/assistant.png \
56     "${pkgdir}/usr/share/icons/hicolor/32x32/apps/assistant.png"
57   install -D -m644 src/assistant/assistant/images/assistant-128.png \
58     "${pkgdir}/usr/share/icons/hicolor/128x128/apps/assistant.png"
59   install -D -m644 src/designer/src/designer/images/designer.png \
60     "${pkgdir}/usr/share/icons/hicolor/128x128/apps/QtProject-designer.png"
61   install -D -m644 src/qdbus/qdbusviewer/images/qdbusviewer.png \
62     "${pkgdir}/usr/share/icons/hicolor/32x32/apps/qdbusviewer.png"
63   install -D -m644 src/qdbus/qdbusviewer/images/qdbusviewer-128.png \
64     "${pkgdir}/usr/share/icons/hicolor/128x128/apps/qdbusviewer.png"
65   install -d "${pkgdir}/usr/share/applications"
66   install -m644 "${srcdir}"/{linguist,designer,assistant,qdbusviewer}.desktop \
67     "${pkgdir}/usr/share/applications/"
69   # Symlinks for backwards compatibility
70   for b in "${pkgdir}"/usr/bin/*; do
71     ln -s $(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt5
72   done
74   # Drop QMAKE_PRL_BUILD_DIR because reference the build dir
75   find "${pkgdir}/usr/lib" -type f -name '*.prl' \
76     -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
78   install -d "$pkgdir"/usr/share/licenses
79   ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname}