# Depends on: unzip

description="A free C++ class library of cryptographic schemes"
url="https://www.cryptopp.com/"
packager="tnut <tnut@nutyx.org>"
contributors="Pierre B"

name=crypto++
version=5.6.5
_version=565
release=2

source=(${url}cryptopp${_version}.zip
        crypto++-libcrypto++.pc)

build() {
  
  sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile

  export CXXFLAGS="${CXXFLAGS} -DNDEBUG -fPIC"

  make -f GNUmakefile  
  make libcryptopp.so

  install -d $PKG/usr/{lib/pkgconfig,include/cryptopp}
  install -m644 *.h $PKG/usr/include/cryptopp/
  install -m644 libcryptopp.so $PKG/usr/lib/libcryptopp.so
  install -m644 $SRC/crypto++-libcrypto++.pc $PKG/usr/lib/pkgconfig/libcrypto++.pc
  install -D -m644 License.txt $PKG/usr/share/licenses/$name/LICENSE
}
