aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5b64225baa2486a78ef601fd5aee713cbbe02285 (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
# Maintainer: Antonio Rojas <arojas@archlinux.org>

_name=bluez-qt
pkgname=${_name}5
pkgver=5.116.0
pkgrel=3
pkgdesc='Qt wrapper for Bluez 5 DBus API'
arch=(x86_64)
url='https://invent.kde.org/frameworks/bluez-qt'
license=('LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-scancode-kde-accepted-lgpl')
depends=(qt5-base bluez)
makedepends=(extra-cmake-modules qt5-declarative)
optdepends=('qt5-declarative: QML bindings')
conflicts=("$_name<5.111")
replaces=("$_name<5.111")
groups=(kf5)
source=(https://download.kde.org/Attic/frameworks/${pkgver%.*}/$_name-$pkgver.tar.xz{,.sig})
sha256sums=('1bab900d6984f4cbec517354cd6ffb11fd1f50887c5bf711ff4305376e039627'
            'SKIP')
validpgpkeys=(53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB) # David Faure <faure@kde.org>

latestver() {
  # KF5 tarballs moved from stable/ to Attic/ after the series wound down.
  # A new 5.x release would appear in stable/ first, so prefer it over Attic.
  local base branch
  for base in stable Attic; do
    branch=$(curl -fsSL "https://download.kde.org/${base}/frameworks/" |
      sed -nE 's@.*href="(5\.[0-9]+)/".*@\1@p' |
      sort -V |
      tail -1)
    [[ -n ${branch} ]] || continue
    curl -fsSL "https://download.kde.org/${base}/frameworks/${branch}/" |
      sed -nE "s@.*${_name}-([0-9]+\.[0-9]+\.[0-9]+)\.tar\.xz.*@\1@p" |
      sort -Vu |
      tail -1
    return
  done
}

build() {
  cmake -B build -S $_name-$pkgver \
    -DUDEV_RULES_INSTALL_DIR=/usr/lib/udev/rules.d \
    -DBUILD_TESTING=OFF
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build

  install -Dm644 "$_name-$pkgver/LICENSES/LicenseRef-KDE-Accepted-LGPL.txt" \
    "$pkgdir/usr/share/licenses/$pkgname/LicenseRef-scancode-kde-accepted-lgpl.txt"
}