summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 475bb4ab3bbe3b45c948dc0e3609c7380f2b3ad8 (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
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>

pkgname=krename-git
pkgver=5.0.60.r863.00fc8b0
pkgrel=1
pkgdesc="A very powerful batch file renamer for KDE. (GIT Version)"
arch=('x86_64')
url='https://apps.kde.org/krename'
license=(
  'BSD-3-Clause'
  'CC0-1.0'
  'GPL-2.0-only'
  'GPL-2.0-or-later'
)
depends=(
  'gcc-libs' # 'libgcc_s.so' 'libstdc++.so'
  'glibc' # 'libc.so'
  'karchive' # 'libKF6Archive.so'
  'kcompletion' # 'libKF6Completion.so'
  'kconfig' # 'libKF6ConfigCore.so'
  'kcoreaddons' # 'libKF6CoreAddons.so'
  'kcrash' # 'libKF6Crash.so'
  'ki18n' # 'libKF6I18n.so'
  'kio' # 'libKF6KIOWidgets.so' 'libKF6KIOGui.so', 'libKF6KIOCore.so' 'libKF6KIOFileWidgets.so'
  'kitemviews' # 'libKF6ItemViews.so'
  'kwidgetsaddons' # 'libKF6WidgetsAddons.so'
  'kxmlgui' # 'libKF6XmlGui.so'
  'exiv2' 'libexiv2.so'
  'freetype2' 'libfreetype.so'
  'podofo' 'libpodofo.so'
  'qt6-base' # 'libQt6Core.so' 'libQt6Gui.so' 'libQt6Widgets.so' 'libQt6Xml.so'
  'qt6-declarative' # 'libQt5Qml.so'
  'qt6-5compat' # 'libQt6Core5Compat.so'
  'taglib' # 'libtag.so'
  'hicolor-icon-theme'
)
makedepends=(
  'git'
  'extra-cmake-modules'
  'python'
  'kdoctools'
)
checkdepends=('appstream')
provides=('krename')
conflicts=('krename')
source=(
  'git+https://invent.kde.org/utilities/krename.git'
)
sha256sums=(
  'SKIP'
)
options=('debug')

pkgver() {
  cd krename
  _ver="$(cat CMakeLists.txt | grep -m1 'krename VERSION' | grep -o "[[:digit:]]*" | paste -sd'.')"
  echo "${_ver}.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

build() {
  cmake -S krename -B build \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DKDE_INSTALL_LIBDIR=lib \
    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
    -DBUILD_TESTING=ON \
    -DBUILD_WITH_QT6=ON

  cmake --build build
}

check() {
  ctest --test-dir build --output-on-failure
}

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

  install -Dm644 krename/LICENSES/BSD-3-Clause.txt "${pkgdir}/usr/share/licenses/${pkgname}/BSD-3-Clause.txt"
}