summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: daa61cbb525b4afd173531cd3075595b3b067b4d (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
56
57
58
59
# Maintainer: redtide <redtid3@gmail.com>

_pkgname=libstatusnotifieritem-qt
pkgbase=$_pkgname-git
pkgname=(libstatusnotifieritem-qt{5,6}-git)
pkgver=r13.defd3d5
pkgrel=1
pkgdesc="Qt implementation of the StatusNotifierItem specification"
arch=(
  i686
  x86_64
)
url="https://github.com/qtilities/libstatusnotifieritem-qt"
license=(LGPL2.1)
makedepends=(
  cmake
  doxygen
  git
)
source=(git+$url.git)
sha512sums=('SKIP')

pkgver() {
  cd $_pkgname
  (
    set -o pipefail
    git describe --long --tags 2>/dev/null | sed 's/^v//; s/\([^-]*-g\)/r\1/;s/-/./g' ||
      printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  for v in 5 6; do
    local cmake_options=(
      -B build$v
      -D CMAKE_INSTALL_PREFIX=/usr
      -D CMAKE_BUILD_TYPE=None
      -D SNI_QT_VERSION=$v
      -S "$srcdir/$_pkgname"
      -W no-dev
    )
    cmake ${cmake_options[@]}
    cmake --build build$v --verbose
  done
}

package_libstatusnotifieritem-qt5-git() {
  depends=(qt5-base libdbusmenu-qtilities5)
  provides=(${_pkgname}5)
  conflicts=(${_pkgname}5)
  DESTDIR="$pkgdir" cmake --install build5
}

package_libstatusnotifieritem-qt6-git() {
  depends=(qt6-base libdbusmenu-qtilities6)
  provides=(${_pkgname}6)
  conflicts=(${_pkgname}6)
  DESTDIR="$pkgdir" cmake --install build6
}