summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a58768edd3a0622dca8aa8b662d3202a0b3fb6ef (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: alba4k <blaskoazzolaaaron@gmail.com>

_pkgname="hyprland-qt-support"
pkgname="$_pkgname-git"
pkgver=0.1.0.r8.g073c52b
pkgrel=1
pkgdesc="A qml style provider for hypr* qt apps"
arch=('x86_64' 'aarch64')
url="https://github.com/hyprwm/hyprland-qt-support"
license=('BSD-3-Clause')

depends=(
  'qt6-wayland>=6.6.0'
  'hyprlang-git>=0.6.0'
)
makedepends=(
  cmake
  git
  ninja
)

provides=("$_pkgname=${pkgver%%.r*}")
conflicts=("$_pkgname")

_pkgsrc=$_pkgname
source=("$_pkgsrc::git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgsrc"
  git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  local cmake_options=(
    -B build
    -S "$_pkgsrc"
    -G Ninja
    -W no-dev
    -D CMAKE_BUILD_TYPE=None
    -D CMAKE_INSTALL_PREFIX=/usr
	-D INSTALL_QML_PREFIX=/lib/qt6/qml
	-D CMAKE_INSTALL_LIBDIR=/usr/lib
  )
  cmake "${cmake_options[@]}"
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 "$_pkgsrc/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/"
}