[arch-commits] Commit in (spdlog spdlog/repos spdlog/trunk spdlog/trunk/PKGBUILD)

Brett Cornwall ainola at archlinux.org
Mon Jul 15 13:55:05 UTC 2019


    Date: Monday, July 15, 2019 @ 13:55:04
  Author: ainola
Revision: 489871

Add spdlog (6 votes), a waybar dependency

Added:
  spdlog/
  spdlog/repos/
  spdlog/trunk/
  spdlog/trunk/PKGBUILD

----------+
 PKGBUILD |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

Added: spdlog/trunk/PKGBUILD
===================================================================
--- spdlog/trunk/PKGBUILD	                        (rev 0)
+++ spdlog/trunk/PKGBUILD	2019-07-15 13:55:04 UTC (rev 489871)
@@ -0,0 +1,45 @@
+# Maintainer: Brett Cornwall <ainola at archlinux.org>
+# Contributor: Luca Weiss
+# Contributor: Michael Yang
+
+pkgname=spdlog
+pkgver=1.3.1
+pkgrel=1
+pkgdesc='Very fast, header-only/compiled, C++ logging library'
+arch=('any')
+url='https://github.com/gabime/spdlog'
+license=('MIT')
+makedepends=('cmake' 'fmt')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/gabime/spdlog/archive/v$pkgver.tar.gz")
+sha256sums=('160845266e94db1d4922ef755637f6901266731c4cb3b30b45bf41efa0e6ab70')
+
+prepare() {
+    mkdir -p build
+}
+
+build() {
+    cd build
+    cmake ../"$pkgname-$pkgver" \
+        -DSPDLOG_BUILD_BENCH=OFF \
+        -DSPDLOG_BUILD_EXAMPLES=OFF \
+        -DSPDLOG_FMT_EXTERNAL=ON \
+        -DCMAKE_BUILD_TYPE=Release \
+        -DCMAKE_INSTALL_PREFIX=/usr \
+        -DCMAKE_INSTALL_LIBDIR=lib
+    make
+}
+
+check() {
+    cd build
+    make test
+}
+
+package() {
+    cd build
+    make DESTDIR="$pkgdir" install
+    install -Dm644 ../"$pkgname-$pkgver/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/"
+
+    # Don't duplicate code from another project...
+    # https://github.com/gabime/spdlog/issues/1146
+    rm -r "$pkgdir/usr/include/spdlog/fmt/"
+}


More information about the arch-commits mailing list