blob: cb9aab9718f533d5288a2484f5aae11442eca2a0 (
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: xiretza <xiretza+aur@xiretza.xyz>
pkgbase=rapidyaml
pkgname=(
rapidyaml
python-rapidyaml
)
pkgver=0.7.2
pkgrel=1
pkgdesc='A library to parse and emit YAML, and do it fast'
arch=(x86_64)
url='https://github.com/biojppm/rapidyaml'
license=(MIT)
makedepends=(
cmake
git
ninja
python-setuptools
python-setuptools-git
python-setuptools-scm
python-cmake-build-extension
swig
)
_tag=9b8df62d9a45c050804305462b243add936c9292
source=(
git+https://github.com/biojppm/rapidyaml.git#tag=${_tag}
git+https://github.com/biojppm/c4core.git
c4core-cmake::git+https://github.com/biojppm/cmake.git
)
b2sums=('SKIP'
'SKIP'
'SKIP')
pkgver() {
cd rapidyaml
git describe --tags | sed 's/^v//'
}
prepare() {
cd rapidyaml
git submodule init
git config submodule.extern/c4core.url "${srcdir}"/c4core
git -c protocol.file.allow=always submodule update
cd ext/c4core
git submodule init
git config submodule.cmake.url "${srcdir}"/c4core-cmake
git -c protocol.file.allow=always submodule update
}
build() {
cmake -B build -S rapidyaml -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
-DRYML_BUILD_API=ON \
-DRYML_DEFAULT_CALLBACK_USES_EXCEPTIONS=ON
cmake --build build
cd rapidyaml
python setup.py build
}
package_rapidyaml() {
depends=(
gcc-libs
glibc
)
provides=(
libc4core.so
libryml.so
)
DESTDIR="${pkgdir}" cmake --install build
rm "${pkgdir}"/usr/{_ryml.so,ryml.py}
install -Dm 644 rapidyaml/LICENSE.txt -t "${pkgdir}"/usr/share/licenses/rapidyaml/
}
package_python-rapidyaml() {
depends=(
gcc-libs
glibc
python
)
cd rapidyaml
python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE.txt -t "${pkgdir}"/usr/share/licenses/python-rapidyaml
}
# vim: ts=2 sw=2 et:
|