summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e4ea1aabf5d83f31b0e8d853f96c8bffe9edef2c (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
# Maintainer:
# Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu >
# Contributor: Alexey D. <lq07829icatm at rambler.ru>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

_pkgname="ark"
pkgname="$_pkgname-git"
pkgver=24.02.1.r99.g531f976
pkgrel=1
pkgdesc='Archiving Tool'
url="https://invent.kde.org/utilities/ark"
license=('GPL-2.0-or-later')
arch=('x86_64')

depends=(
  kconfig
  kcrash
  kdbusaddons
  kfilemetadata
  ki18n
  kio
  kparts
  kpty
  libarchive

  ## implicit
  #bash
  #hicolor-icon-theme
  #kcolorscheme
  #kcompletion
  #kconfigwidgets
  #kcoreaddons
  #kjobwidgets
  #kservice
  #kwidgetsaddons
  #kwindowsystem
  #kxmlgui
  #libzip
  #qt6-base
  #zlib
)
makedepends=(
  extra-cmake-modules
  git
  kdoctools
  ninja
)
optdepends=(
  'arj: ARJ format support'
  'lrzip: LRZ format support'
  'lzop: LZO format support'
  'p7zip: 7Z format support'
  'unarchiver: RAR format support'
  'unrar: RAR decompression support'
)

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

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

pkgver() {
  cd "$_pkgsrc"

  local _tag=$(git tag | grep -Ev '\.[0-9][0-9]$' | sort -rV | head -1)
  local _revision=$(git rev-list --count --cherry-pick "$_tag"...HEAD)
  local _hash=$(git rev-parse --short=7 HEAD)

  printf '%s.r%s.g%s' "${_tag#v}" "$_revision" "$_hash"
}

build() {
  local _cmake_options=(
    -B build
    -S "$_pkgsrc"
    -G Ninja
    -DCMAKE_BUILD_TYPE=None
    -DBUILD_TESTING=OFF
    -Wno-dev
  )

  cmake "${_cmake_options[@]}"
  cmake --build build
}

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