mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
51 lines
1.5 KiB
Bash
51 lines
1.5 KiB
Bash
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
|
|
# Contributor: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - remove -flto from CMakeLists
|
|
|
|
pkgname=libcbor
|
|
pkgver=0.6.1
|
|
pkgrel=1
|
|
pkgdesc='C library for parsing and generating CBOR, the general-purpose schema-less binary data format'
|
|
url='https://github.com/PJK/libcbor'
|
|
arch=('x86_64')
|
|
license=('MIT')
|
|
depends=('glibc')
|
|
makedepends=('cmake' 'cmocka')
|
|
provides=('libcbor.so')
|
|
source=(https://github.com/PJK/libcbor/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
|
|
sha256sums=('19309b84d4d88ae1179f3686bd246d977710801c1603915c51f618ba76727e94')
|
|
b2sums=('2a258bc5dea44e54d32012d8f4937330c721ceac380317413dc3a5e52ae998e81785623b86833035151b8f17c5591a797e534ba7f1b66ac26dba58c3ad300afc')
|
|
|
|
prepare() {
|
|
cd ${pkgname}-${pkgver}
|
|
sed -i 's/-flto//g' CMakeLists.txt
|
|
}
|
|
|
|
build() {
|
|
mkdir -p ${pkgname}-${pkgver}/build
|
|
cd ${pkgname}-${pkgver}/build
|
|
cmake .. \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_C_FLAGS="${CFLAGS} ${CPPFLAGS}" \
|
|
-DWITH_TESTS=1
|
|
make cbor cbor_shared VERBOSE=1
|
|
make -C test VERBOSE=1
|
|
}
|
|
|
|
check() {
|
|
cd ${pkgname}-${pkgver}/build
|
|
make -C test test
|
|
}
|
|
|
|
package() {
|
|
cd ${pkgname}-${pkgver}
|
|
make -C build DESTDIR="${pkgdir}" install
|
|
install -Dm 644 README.md CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
|
|
install -Dm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
}
|
|
|
|
# vim: ts=2 sw=2 et:
|