_name=passwordfile pkgname=mingw-w64-passwordfile pkgver=2.0.5 pkgrel=1 arch=('any') pkgdesc="A library for reading and writing AES-256-CBC encrypted password files using OpenSSL (mingw-w64)." license=('GPL') depends=('mingw-w64-crt' 'mingw-w64-c++utilities' 'mingw-w64-openssl') makedepends=('mingw-w64-gcc') url="https://github.com/Martchus/passwordfile" source=("passwordfile-${pkgver}.tar.gz::https://github.com/Martchus/passwordfile/archive/v${pkgver}.tar.gz") _reponame=passwordfile sha256sums=('4e94aff9225d8873f752995c1bcc5f15') options=('staticlibs' '!strip') _architectures="i686-w64-mingw32 x86_64-w64-mingw32" # head end build() { cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" # build for each architecture for _arch in ${_architectures}; do mkdir -p build-${_arch} && pushd build-${_arch} INSTALL_ROOT=$pkgdir/usr/ ${_arch}-qmake-qt5 -r ../${_name}.pro make popd done } package() { cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}" for _arch in ${_architectures}; do # bin stuff pushd build-${_arch} ${_arch}-strip --strip-unneeded ./release/${_name}.dll ${_arch}-strip --strip-unneeded ./release/lib${_name}.dll.a install -m755 -D ./release/${_name}.dll $pkgdir/usr/${_arch}/bin/${_name}.dll install -m755 -D ./release/lib${_name}.dll.a $pkgdir/usr/${_arch}/lib/lib${_name}.dll.a popd # include files for dir in io util do mkdir -p $pkgdir/usr/${_arch}/include/${_name}/$dir install -m644 -D ./$dir/*.h $pkgdir/usr/${_arch}/include/${_name}/$dir done done }