summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 16fed808bf669f98884567cc163e0104981d0992 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Maintainer: DeltaCopy <7x0bb03yq@mozmail.com>
# Description: Builds Darkly from https://github.com/Bali10050/Darkly

# basic info
pkgname="darkly"
pkgver=0.5.13
pkgrel=1
pkgdesc="Bali10050's fork of Lightly (A modern style for qt applications)"
url="https://github.com/Bali10050/darkly"
arch=('x86_64' 'aarch64')
license=("GPL-2.0-or-later")
pkgdir="$srcdir/fakeinstall_kf6"
build_dir="build_kf6"

makedepends=(
  'cmake'
  'extra-cmake-modules'
  'git'
)

options=(!emptydirs !debug)

source=(
    "${pkgname}.git::git+${url}.git#tag=v${pkgver//_/-}"
)

sha256sums=(
  'e978bec25a11e94dfa62e9316929049f5006b61cf1de6633cc53db37ae8d0f4b'
)

# KF6/Qt6
depends_kf6=(
  'kdecoration'
  'qt6-declarative'
  'kcoreaddons'
  'kcmutils'
  'kcolorscheme'
  'kconfig'
  'kguiaddons'
  'kiconthemes'
  'kwindowsystem'
)

# KF5/QT5 for backward compatibility
depends_kf5=(
    'kcmutils5'
    'frameworkintegration5'
    'kconfigwidgets5'
    'kiconthemes5'
    'kirigami2'
    'kwindowsystem5'
)

depends=("${depends_kf6[@]}" "${depends_kf5[@]}")

conflicts=(
  lightly-kf6
  lightly-qt
  lightly-qt6-bin
  lightly-qt6
  darkly-bin
)

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

prepare() {
  cd "$srcdir/$pkgname.git"
}

build() (
  local cmake_options=(
    -B $build_dir
    -S "$pkgname.git"
    -DBUILD_TESTING=OFF
    -Wno-dev
  )

  cmake "${cmake_options[@]}"

  # for build optimization: use all cores -1 to not overload system

  printf "Using $(($(nproc) - 1)) cores\n"
  cmake --build $build_dir -j $(($(nproc) - 1))
)

package() (
  install -dm755 "$pkgdir.git"
  DESTDIR="$pkgdir" cmake --install $build_dir
  rm -rf "$pkgdir/usr/lib/cmake"
)