summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cf66ee0f027d2f871df2df2712644a213e4746bb (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
# Maintainer: FadeMind <fademind@gmail.com>
# Contributor: Alexey D. <lq07829icatm@rambler.ru>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=extra-cmake-modules-git
pkgver=6.1.0.r3681.1e6808bd
pkgrel=1
pkgdesc='Extra modules and scripts for CMake. (GIT version)'
arch=('any')
url='https://projects.kde.org/projects/kdesupport/extra-cmake-modules'
license=('LGPL')
groups=('kf6')
depends=('cmake')
makedepends=(
  'git'
  'python-sphinx'
  'python-requests'
)
checkdepends=(
  'reuse'
  'qt5-tools'
  'qt5-base'
  'qt5-declarative'
)
conflicts=('extra-cmake-modules')
provides=("extra-cmake-modules=${pkgver%%.r*}")
optdepends=(
 'python-pyxdg: to generate fastlane metadata for Android apps'
 'python-requests: to generate fastlane metadata for Android apps'
 'python-yaml: to generate fastlane metadata for Android apps'
 'clang: for clang support'
)
source=('git+https://invent.kde.org/frameworks/extra-cmake-modules.git')
sha256sums=('SKIP')

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

prepare() {
  sed -e 's|\.\*\/extra-cmake-modules|extra-cmake-modules|g' \
      -e 's|\*\/extra-cmake-modules|extra-cmake-modules|g' \
      -i extra-cmake-modules/tests/KDEFetchTranslations/CMakeLists.txt
}

build() {
  cmake -S extra-cmake-modules -B build \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_QTHELP_DOCS=ON \
    -DBUILD_TESTING=ON \

  cmake --build build
}

check() {
  cd build
  ctest --output-on-failure -E ECMPoQmToolsTest
}

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