PKGBUILDs/extra/yaml-cpp/PKGBUILD

48 lines
1.5 KiB
Bash
Raw Normal View History

2023-09-15 14:08:04 +00:00
# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
# Contributor: David Runge <dvzrv@archlinux.org>
# Contributor: Markus Martin <markus@archwyrm.net>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - build with -fsigned-char
pkgname=yaml-cpp
pkgver=0.8.0
2024-07-14 12:57:13 +00:00
pkgrel=2
2023-09-15 14:08:04 +00:00
pkgdesc="YAML parser and emitter in C++, written around the YAML 1.2 spec"
url="https://github.com/jbeder/yaml-cpp"
arch=('x86_64')
license=('MIT')
depends=('gcc-libs' 'glibc')
provides=('libyaml-cpp.so')
makedepends=('cmake' 'ninja')
source=("https://github.com/jbeder/yaml-cpp/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('aae9d618f906117d620d63173e95572c738db518f4ff1901a06de2117d8deeb8045f554102ca0ba4735ac0c4d060153a938ef78da3e0da3406d27b8298e5f38e')
build() {
cd ${pkgname}-${pkgver}
CFLAGS+=" -fsigned-char" && CXXFLAGS="$CFLAGS"
cmake -GNinja \
-Bbuild \
-DYAML_CPP_BUILD_TESTS=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
-DYAML_BUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release
ninja -C build
}
check() {
cd ${pkgname}-${pkgver}
ninja -C build test
build/test/yaml-cpp-tests
}
package() {
cd ${pkgname}-${pkgver}
DESTDIR="${pkgdir}" ninja -C build install
install -vDm 644 {CONTRIBUTING,README}.md -t "${pkgdir}/usr/share/doc/${pkgname}"
install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
rm -rf "${pkgdir}"/usr/{lib,lib/pkgconfig,include}/*{gtest,gmock}*
rm -rf "${pkgdir}"/usr/lib/cmake/GTest
}