From 503a6f5b506ba4e7d24ccd7fc9e9cc571f9716c5 Mon Sep 17 00:00:00 2001 From: xhaa123 Date: Wed, 30 Oct 2024 01:26:33 +0800 Subject: [PATCH] libcbor 0.11.0-1 --- PKGBUILD | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..96764c8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# This is an example PKGBUILD file. Use this as a start to creating your own, +# and remove these comments. For more information, see 'man PKGBUILD'. +# NOTE: Please fill out the license field for your package! If it is unknown, +# then please put 'unknown'. + +# Maintainer: Future Linux Team +pkgname=libcbor +pkgver=0.11.0 +pkgrel=1 +pkgdesc="C library for parsing and generating CBOR, the general-purpose schema-less binary data format" +arch=('x86_64') +url="https://github.com/PJK/libcbor" +license=('MIT') +depends=('glibc') +makedepends=('cmake' 'cmocka') +source=(https://github.com/PJK/libcbor/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz) +sha256sums=(89e0a83d16993ce50651a7501355453f5250e8729dfc8d4a251a78ea23bb26d7) + +build() { + cd ${pkgname}-${pkgver} + + cmake -Bbuild \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib64 \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_FLAGS="${CFLAGS} ${CPPFLAGS}" \ + -DBUILD_SHARED_LIBS=ON \ + -DWITH_TESTS=1 + + make -C build VERBOSE=1 + make -C build/test VERBOSE=1 + +} + +package() { + cd ${pkgname}-${pkgver} + + DESTDIR=${pkgdir} cmake --install build +}