mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
40 lines
974 B
Bash
40 lines
974 B
Bash
pkgname=yaml-cpp
|
|
pkgver=0.6.1
|
|
pkgrel=1
|
|
pkgdesc="YAML parser and emitter in C++, written around the YAML 1.2 spec"
|
|
url="http://code.google.com/p/yaml-cpp/"
|
|
arch=('x86_64')
|
|
license=('MIT')
|
|
depends=('gcc-libs')
|
|
makedepends=('cmake')
|
|
source=(https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-${pkgver}.tar.gz)
|
|
md5sums=('32204de7d9e0ae7ea23bfddecac9f9c6')
|
|
|
|
prepare() {
|
|
mkdir -p yaml-cpp-yaml-cpp-$pkgver/build
|
|
}
|
|
|
|
build() {
|
|
cd yaml-cpp-yaml-cpp-$pkgver/build
|
|
cmake .. \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
make
|
|
}
|
|
|
|
check() {
|
|
cd yaml-cpp-yaml-cpp-$pkgver/build
|
|
make test
|
|
test/run-tests
|
|
}
|
|
|
|
package() {
|
|
cd yaml-cpp-yaml-cpp-$pkgver
|
|
|
|
make -C build DESTDIR="$pkgdir" install
|
|
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
# avoid conflicting gtest/gmock files
|
|
rm -rf "$pkgdir"/usr/include/{gmock,gtest} "$pkgdir"/usr/lib/lib{gmock,gtest}*.so
|
|
}
|