db-move: moved polari from [testing] to [extra] (x86_64)
[arch-packages.git] / libdbusmenu-qt / repos / extra-x86_64 / PKGBUILD
blobbc5ba10df8d491a23d0e9877f58bd893d8ff1fe5
1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Contributor: Andrea Scarpino <andrea@archlinux.org>
4 pkgbase=libdbusmenu-qt
5 pkgname=(libdbusmenu-qt5 libdbusmenu-qt6)
6 pkgver=0.9.3+16.04.20160218
7 pkgrel=6
8 pkgdesc='A library that provides a Qt implementation of the DBusMenu spec'
9 arch=(x86_64)
10 url='https://github.com/desktop-app/libdbusmenu-qt'
11 license=(GPL)
12 makedepends=(cmake doxygen qt5-base qt6-base)
13 source=(http://archive.ubuntu.com/ubuntu/pool/main/libd/$pkgbase/${pkgbase}_$pkgver.orig.tar.gz
14         https://github.com/desktop-app/libdbusmenu-qt/commit/af9fa001.patch
15         libdbusmenu-qt6-cmake.patch)
16 sha256sums=('a8e6358a31c44ccdf1bfc46c95a77a6bfc7fc1f536aadb913ed4f4405c570cf6'
17             'a853330e5d1edc12b5032d6826ba6c2c1ad1eb3d43cee913c9bc4b97d6fe5561'
18             'ccd4e73afb360229eb59661257476ce5a1137d43f1bb0c30e1786f4365160ac2')
20 prepare() {
21   patch -d $pkgbase-$pkgver -p1 < af9fa001.patch # Support Qt6
22   patch -d $pkgbase-$pkgver -p1 < libdbusmenu-qt6-cmake.patch
23   sed -e '/tests/d' -i $pkgbase-$pkgver/CMakeLists.txt # Build fails with Qt6
26 build() {
27   cmake -B build5 $pkgbase-$pkgver \
28     -DCMAKE_INSTALL_PREFIX=/usr \
29     -DUSE_QT5=ON
30   cmake --build build5
32   cmake -B build6 $pkgbase-$pkgver \
33     -DCMAKE_INSTALL_PREFIX=/usr \
34     -DUSE_QT6=ON
35   cmake --build build6
38 package_libdbusmenu-qt5() {
39   depends=(qt5-base)
41   DESTDIR="$pkgdir" cmake --install build5
44 package_libdbusmenu-qt6() {
45   depends=(qt6-base)
47   DESTDIR="$pkgdir" cmake --install build6