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

packager="tnut <tnut@nutyx.org>"
contributors="Pierre B, Rems"

makedepends=(unzip)

name=crypto++
version=8.2.0

source=(${url}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"
# Remove cryptest.exe and test files, only needed for check() and bloats the package
# because cryptest.exe is linked statically.
rm "$PKG/usr/bin/cryptest.exe"
rmdir "$PKG/usr/bin/"
rm -r "$PKG/usr/share/cryptopp/"
}
