# Maintainer: PktSurf <smlinux@pktsurf.in>
app=qpdf
version=11.1.0
build=2sml
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() {
  mkdir -p smbuild && cd smbuild 
  cmake .. \
    -DCMAKE_INSTALL_PREFIX="" \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_STATIC_LIBS=OFF \
    -DINSTALL_EXAMPLES=OFF
  
  make
  make install DESTDIR=$pkg 

  cp ../LICENSE.txt $pkgdocs/

  mkfinalpkg
}

sha512sums="
ccfc7cfe3b5beaf73c064c36056bf4c9cbecc8709c1afc7b5a1de58055d2818a82f6fffd5b59b700b06215d84646267eaa2cfc014721041af94b6a29d9f67b4d  qpdf-11.1.0.tar.lz
"
