diff options
Diffstat (limited to 'community/spdlog/APKBUILD')
-rw-r--r-- | community/spdlog/APKBUILD | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/community/spdlog/APKBUILD b/community/spdlog/APKBUILD new file mode 100644 index 0000000000..fe5ecaffc1 --- /dev/null +++ b/community/spdlog/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Leo <thinkabit.ukim@gmail.com> +# Maintainer: Leo <thinkabit.ukim@gmail.com> +pkgname=spdlog +pkgver=1.4.2 +pkgrel=1 +pkgdesc="Fast C++ logging library" +url="https://github.com/gabime/spdlog" +arch="all" +license="MIT" +makedepends="cmake fmt-dev" +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.gz::https://github.com/gabime/spdlog/archive/v$pkgver.tar.gz" + +build() { + mkdir build + cd build + if [ "$CBUILD" != "$CHOST" ]; then + CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" + fi + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DSPDLOG_BUILD_BENCH=OFF \ + -DSPDLOG_BUILD_TESTS=ON \ + -DSPDLOG_SANITIZE_ADDRESS=OFF \ + -DSPDLOG_FMT_EXTERNAL=ON \ + -DSPDLOG_BUILD_SHARED=ON \ + -DSPDLOG_BUILD_EXAMPLE=OFF \ + ${CMAKE_CROSSOPTS} .. + make +} + +check() { + cd build + make test +} + +package() { + mkdir -p "$pkgdir" + make -C build DESTDIR="$pkgdir" install +} + +dev() { + default_dev + + # Fix path + mkdir -p "$subpkgdir"/usr/lib/cmake/spdlog + mv "$pkgdir"/usr/lib/spdlog/cmake/* "$subpkgdir"/usr/lib/cmake/spdlog/ + rmdir -p "$pkgdir"/usr/lib/spdlog || true +} + +sha512sums="886b489138a1bdf363b5eab65a7d973f570a01c399ff5b910fcfee172ad4ff4d42a45dc2ae24e77b07130df527fb13a86b3e55ac992e72c418aebb232e27eabf spdlog-1.4.2.tar.gz" |