Date: Monday, January 10, 2022 @ 08:11:52 Author: alucryd Revision: 1098991
add rapidyaml Added: rapidyaml/ rapidyaml/trunk/ rapidyaml/trunk/PKGBUILD ----------+ PKGBUILD | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) Added: rapidyaml/trunk/PKGBUILD =================================================================== --- rapidyaml/trunk/PKGBUILD (rev 0) +++ rapidyaml/trunk/PKGBUILD 2022-01-10 08:11:52 UTC (rev 1098991) @@ -0,0 +1,84 @@ +# Maintainer: Maxime Gauduin <[email protected]> +# Contributor: xiretza <[email protected]> + +pkgbase=rapidyaml +pkgname=( + rapidyaml + python-rapidyaml +) +pkgver=v0.3.0 +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-scm + #python-cmake-build-extension + swig +) +_tag=ee581f85707da11eb25e48fc0b7f161167d58a7e +source=( + git+https://github.com/biojppm/rapidyaml.git#tag=${_tag} + git+https://github.com/biojppm/c4core.git + git+https://github.com/biojppm/cmake.git +) +b2sums=('SKIP' + 'SKIP' + 'SKIP') + +pkgver() { + cd rapidyaml + git describe --tags +} + +prepare() { + cd rapidyaml + git submodule init + git config submodule.extern/c4core.url "${srcdir}"/c4core + git submodule update + cd ext/c4core + git submodule init + git config submodule.cmake.url "${srcdir}"/cmake + git submodule update +} + +build() { + cmake -B build -S rapidyaml -G Ninja \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_SHARED_LIBS=ON \ + -DRYML_BUILD_API=ON + cmake --build build + cd rapidyaml + python setup.py build +} + +package_rapidyaml() { + depends=( + gcc-libs + glibc + ) + provides=(c4core) + + 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:
