# Maintainer: PktSurf <smlinux@pktsurf.in>
app=qpdf
version=11.4.0
build=1sml
homepage="https://github.com/qpdf/qpdf"
download="https://github.com/qpdf/qpdf/releases/download/v$version/qpdf-$version.tar.gz"
desc="Command-line tools and library for transforming PDF files"
requires="gcc-libs pcre"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version 
  fixbuilddirpermissions
}

build() {
  unset CFLAGS CXXFLAGS 
  mkdir -p smbuild && cd smbuild 
  cmake .. \
    -DCMAKE_INSTALL_PREFIX="" \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_BUILD_TYPE=MinSizeRel \
    -DBUILD_STATIC_LIBS=OFF \
    -DINSTALL_EXAMPLES=OFF
  
  make
  make install DESTDIR=$pkg 

  cp ../LICENSE.txt $pkgdocs/

  mkfinalpkg
}

sha512sums="
6f31a37a9a52752c89d319e0d29d8e6c1e4885ca494de47a65f9374cdb5672497ab93f754481300c8e6c68fc2874860997b778dc05386b6f3e6a5a70a3f9f754  qpdf-11.4.0.tar.gz
"
