blob: d89e091811b0559efe32854c44894b77cfdd9568 (
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
|
# Ruijie Yu (first.last@outlook.com)
pkgname=semver-cpp-git
_pkgname=${pkgname%-git}
pkgver=0.2.2.r18.ge804882
pkgrel=1
pkgdesc='Semantic Versioning for modern C++'
url="https://github.com/Neargye/semver"
arch=(any)
license=(MIT)
depends=()
optdepends=(
'gcc: c++ compiler'
'clang: c++ compiler'
)
makedepends=(git cmake make)
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=(
"$_pkgname::git+$url.git#branch=master"
)
sha512sums=(SKIP)
_cmake_config=Release
prepare() {
cd "${srcdir}/${_pkgname}"
cmake \
--warn-uninitialized \
--warn-unused-vars \
-S . -B build
}
build() {
cmake \
--build "${srcdir}/${_pkgname}/build" \
--config "$_cmake_config" \
-j
}
check() {
cd "${srcdir}/${_pkgname}/build"
ctest \
--no-tests=ignore \
--output-on-failure \
--progress
}
pkgver() {
cd "${srcdir}/${_pkgname}"
local _version="$(git describe --tags --match 'v*' | sed s/-/.r/ | sed s/-/./)"
echo "${_version#v}"
}
package() {
cmake \
--install "${srcdir}/${_pkgname}/build" \
--prefix "${pkgdir}/usr/" \
--config "$_cmake_config"
}
|