# Contributer: Reza Tavakoli pkgbase=libcbor pkgname=("${pkgbase}" "${pkgbase}-devel") pkgver=0.11.0 pkgrel=1 pkgdesc="A C library for parsing and generating CBOR, a general-purpose schema-less binary data format" arch=('i686' 'x86_64') url="https://github.com/PJK/libcbor" license=('spdx:MIT') makedepends=("cmake" "make" "gcc") source=(https://github.com/PJK/libcbor/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz) sha256sums=('89e0a83d16993ce50651a7501355453f5250e8729dfc8d4a251a78ea23bb26d7') build() { cd ${pkgname}-${pkgver} cmake . \ -Bbuild \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCBOR_CUSTOM_ALLOC=ON \ -DBUILD_SHARED_LIBS=ON cmake --build build DESTDIR="${srcdir}/dest" cmake --install build } package_libcbor() { groups=("libraries") mkdir -p ${pkgdir}/usr/bin cp -f ${srcdir}/dest/usr/bin/*.dll ${pkgdir}/usr/bin/ } package_libcbor-devel() { pkgdesc="Development headers and library for libcbor" depends=("$pkgbase=$pkgver") groups=("development") mkdir -p ${pkgdir}/usr/lib cp -rf ${srcdir}/dest/usr/include ${pkgdir}/usr cp -rf ${srcdir}/dest/usr/lib ${pkgdir}/usr }