summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 73cba9388683dce61226bf410a9ae80824b4a628 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: coolingtool <coolingtool-backup@outlook.com>
# Contributor: Maintainer of qt5-wayland Felix Yan <felixonmars@archlinux.org>
# Contributor: Contributor of qt5-wayland Andrea Scarpino <andrea@archlinux.org>
# (Modified from qt5-wayland's PKGBUILD)

_basename=qt5-wayland
pkgname=qt5-wayland-decorations
_basever=5.15.13
pkgver=5.15.13+kde+r60
pkgrel=1
_commit=9c82b5461736f59a06923ab68c6f7584ecab4f77
_patchcommit=1d8e08648debad9741dca0820f5f0e91633b5a4e
arch=('x86_64')
url='https://www.qt.io'
license=('GPL3' 'LGPL3' 'FDL' 'custom')
pkgdesc='Provides APIs for Wayland (with patch required for shadows on qadwaitadecorations-qt5)'
depends=('qt5-declarative' 'libxcomposite')
provides=('qt5-wayland')
conflicts=('qt5-wayland')
makedepends=('vulkan-headers' 'git')
_pkgfqn=${_basename/5-/}
source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit
        https://src.fedoraproject.org/rpms/qt5-qtwayland/raw/$_patchcommit/f/qtwayland-decoration-support-backports-from-qt6.patch)
sha256sums=('SKIP'
            '4d8c5d686666cbaae7550ec3defee66ea56ca624152c56c51ff945693706c29d')

pkgver() {
  cd $_pkgfqn
  echo "$_basever+kde+r"`git rev-list --count v$_basever-lts-lgpl..$_commit` | sed -e 's|+kde+r0||'
}

prepare() {
  mkdir -p build
  patch --directory="$_pkgfqn" --strip=1 --input="${srcdir}/qtwayland-decoration-support-backports-from-qt6.patch"
}

build() {
  cd build

  qmake ../${_pkgfqn}
  make
}

package() {
  cd build

  make INSTALL_ROOT="$pkgdir" install

  # Drop QMAKE_PRL_BUILD_DIR because reference the build dir
  find "$pkgdir/usr/lib" -type f -name '*.prl' \
    -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;

  install -d "$pkgdir"/usr/share/licenses
  ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname}
}