blob: 1a9c732bfa1e70f7bb5668f563d31008d1f0eb6d (
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: Gustavo Rehermann <rehermann6046@gmail.com>
pkgname=ckdl-git # '-bzr', '-git', '-hg' or '-svn'
pkgver=1.0.r3.ge5a94d6
pkgrel=1
pkgdesc="KDL parsing library in C, Python, C++"
arch=(x86_64)
url="https://github.com/tjol/ckdl"
license=('MIT')
groups=()
depends=()
makedepends=(git cmake)
provides=("${pkgname%-VCS}")
conflicts=("${pkgname%-VCS}")
replaces=()
backup=()
options=()
install=
source=($pkgname'::git+https://github.com/tjol/ckdl')
noextract=()
sha256sums=('SKIP')
# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
# a description of each element in the source array.
pkgver() {
cd "$srcdir/$pkgname"
printf "%s" "$(git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g')"
}
build() {
cd "$srcdir"
local cmake_options=(
-B build
-S $pkgname
-W no-dev
-D CMAKE_BUILD_TYPE=None
-D BUILD_SHARED_LIBS=ON
-D CMAKE_INSTALL_PREFIX=/usr
)
cmake "${cmake_options[@]}"
cmake --build build
}
check() {
cd "$srcdir"
local excluded_tests=""
local ctest_flags=(
--test-dir build
# show the stdout and stderr when the test fails
--output-on-failure
# execute tests in parallel
--parallel $(nproc)
# exclude problematic tests
--exclude-regex "$excluded_tests"
)
ctest "${ctest_flags[@]}"
}
package() {
cd "$srcdir"
DESTDIR="$pkgdir" cmake --install build
}
|