# Description: Public Suffix List library
# URL: https://github.com/rockdaboot/libpsl
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: libidn2 publicsuffix-list

name=libpsl
version=0.21.5
release=1
source=(https://github.com/rockdaboot/$name/releases/download/$version/$name-$version.tar.lz)

build() {
  meson setup build $name-$version \
    --prefix=/usr \
    --buildtype=plain \
    --wrap-mode nodownload \
    -D b_lto=true \
    -D b_pie=true \
    -D runtime=libidn2 \
    -D builtin=true \
    -D psl_file=/usr/share/publicsuffix/effective_tld_names.dat \
    -D psl_testfile=/usr/share/publicsuffix/test_psl.txt \
    -D tests=false

  ninja -j ${JOBS-1} -C build
  DESTDIR=$PKG meson install -C build
}
