makedepends=(unzip)

packager="Great-OS Team"
maintainer="Great-OS Team"

description="A free C++ class library of cryptographic schemes"
url="https://www.cryptopp.com/"

name=crypto++
version=8.9.0

source=(https://github.com/weidai11/cryptopp/releases/download/CRYPTOPP_8_9_0/cryptopp${version//./}.zip
        libcrypto++.pc)

build() {
  export CXXFLAGS="${CXXFLAGS} -DNDEBUG -fPIC"  

  make dynamic cryptest.exe

  make install DESTDIR="$PKG" PREFIX="/usr"

  install -d "${PKG}/usr/lib/pkgconfig"
  install -m644 "libcrypto++.pc" "${PKG}/usr/lib/pkgconfig/libcrypto++.pc"

  rm "$PKG/usr/bin/cryptest.exe"

  rmdir "$PKG/usr/bin/"
  rm -r "$PKG/usr/share/cryptopp/"
}
