# Description: Yet Another JSON Library
# URL:         http://lloyd.github.com/yajl/
# Maintainer:  Juergen Daubert, jue at crux dot nu
# Depends on:  cmake

name=yajl
version=2.1.0
release=2
source=(https://github.com/lloyd/$name/archive/refs/tags/$version/$name-$version.tar.gz)

build() {
    cmake -S $name-$version -B build \
        -D CMAKE_BUILD_TYPE=Release \
        -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
        -D CMAKE_INSTALL_PREFIX=/usr \
        -Wno-dev
    cmake --build build
    DESTDIR=$PKG cmake --install build

    mv $PKG/usr/share/pkgconfig $PKG/usr/lib
    rm -r $PKG/usr/share
}
