cruxports/libucl/Pkgfile
2022-02-05 15:39:19 -05:00

29 lines
975 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=97e58db4114
release=1
source=(https://github.com/vstakhov/libucl/tarball/$version)
renames=($name-$version.tar.gz)
build() {
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_LIBDIR="/usr/lib" ../vstakhov-$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
< ../vstakhov-$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
}