summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 14d3c980e51be119a2f4f583d0ca88bfb821b877 (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
# Maintainer: Robert Tari <robert at tari dot in>

pkgname="cmake-extras-git"
_pkgname="cmake-extras"
pkgver=r283
pkgrel=1
pkgdesc="A collection of add-ons for the CMake build tool"
arch=("any")
url="https://gitlab.com/ubports/core/${_pkgname}"
license=("LGPL3")
depends=("cmake" "python")
makedepends=("git" "cmake")
source=("${_pkgname}::git+https://gitlab.com/ubports/core/${_pkgname}.git")
md5sums=("SKIP")
options=("!emptydirs")
provides=("${_pkgname}")
conflicts=("${_pkgname}")

pkgver()
{
    cd ${srcdir}/${_pkgname}
    printf "r%s" "$(git rev-list --count HEAD)"
}

build()
{
    cd ${srcdir}/${_pkgname}
    cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr
    cmake --build build
}

package()
{
    cd ${srcdir}/${_pkgname}
    DESTDIR=${pkgdir} cmake --install build
}