summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: df5d26fda71d571d8e8ade7f1b5df6d2cb8c3174 (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
# Ruijie Yu (first.last@outlook.com)
pkgname=ctre
_pkgname=compile-time-regular-expressions
pkgver=3.3.4
pkgrel=1
pkgdesc='A Compile time PCRE (almost) compatible regular expression matcher'
url="https://github.com/hanickadot/$_pkgname/"
arch=(any)
license=(Apache-2.0)
depends=()
optdepends=(
'gcc: c++ compiler'
'clang: c++ compiler'
)
makedepends=(git cmake make)
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=(
    "$url/archive/v$pkgver.tar.gz"
)
sha512sums=('2b1880e279d3458d2943f5154011a9f9dabeb216c56fc20a80b37b2485a3eb0b1c59f6d093a45416ce23d77c4b69fecbf5acea2f8022e3dc3014611e9df02464')
b2sums=('a87ca6d56ca5526ce526638d4f711f5be2039f7e5ecd3ac37629c4bc1e976b96e289877319031b7e2837badced97ad98ba8d397ed2d801e71e22f099f34bb44a')
_cmake_config=Release

_extracted="$_pkgname-$pkgver"

prepare() {
    cd "${srcdir}/${_extracted}"
    cmake \
        --warn-uninitialized \
        --warn-unused-vars \
        -S . -B build
}

build() {
    cmake \
        --build "${srcdir}/${_extracted}/build" \
        --config "$_cmake_config" \
        -j
}

check() {
    cd "${srcdir}/${_extracted}/build"
    ctest \
        --no-tests=ignore \
        --output-on-failure \
        --progress
}

package() {
    cmake \
        --install "${srcdir}/${_extracted}/build" \
        --prefix "${pkgdir}/usr/" \
        --config "$_cmake_config"
}