cruxports/libucl/Pkgfile

28 lines
915 B
Plaintext

# Description: library for parsing nginx-inspired universal configuration language
# URL: https://github.com/vstakhov/libucl
# Maintainer: John McQuah, jmcquah at disroot dot org
# Depends on:
name=libucl
version=master
release=1
source=(https://github.com/vstakhov/${name}.git#${version})
build() {
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_LIBDIR="/usr/lib" ../$name
cmake --build .
make DESTDIR=$PKG install
LIBS_PRIVATE="-lopenssl"
prt-get isinst luajit && LIBS_PRIVATE+=" $(pkg-config --libs luajit)"
mkdir -p $PKG/usr/lib/pkgconfig
< ../$name/$name.pc.in sed 's|@prefix@|/usr|; s|@exec_prefix@|${prefix}|' \
| sed 's|@libdir@|${exec_prefix}/lib|; s|@includedir@|${prefix}/include|' \
| sed "s|@UCL_VERSION@|$version|; s|@LIBS_EXTRA@ @LUA_LIB@|$LIBS_PRIVATE|" \
> $PKG/usr/lib/pkgconfig/$name.pc
}