diff options
author | osfans | 2017-05-16 10:08:01 +0800 |
---|---|---|
committer | osfans | 2017-05-16 10:08:37 +0800 |
commit | acb897c7804864af00c3b353b44cf955330fa625 (patch) | |
tree | 345ae198a49911743772ecc993e068dab15b28d2 /PKGBUILD | |
download | aur-mingw-w64-miniglog.tar.gz |
Init miniglog
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a4910fe8534e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: osfans <waxaca (at) 163 .dot. com> +_pkgname=miniglog +pkgname=mingw-w64-$_pkgname +pkgver=0.0.1 +pkgrel=1 +pkgdesc="A logging library based on the miniglog library found in ceres-solver (mingw-w64)" +arch=('any') +url="https://github.com/arpg/miniglog" +license=('GPL') +makedepends=('mingw-w64-cmake' 'git' 'make') +options=('!strip' '!buildflags' 'staticlibs') +source=('miniglog::git+https://github.com/arpg/miniglog.git') +md5sums=('SKIP') + +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +build() { + #unset LDFLAGS + cd "$srcdir/$_pkgname" + for _arch in ${_architectures}; do + mkdir -p "build-${_arch}-static" && pushd "build-${_arch}-static" + ${_arch}-cmake -DCMAKE_INSTALL_PREFIX="" -DBUILD_SHARED_LIBS:BOOL=OFF .. + make + popd + mkdir -p "build-${_arch}" && pushd "build-${_arch}" + ${_arch}-cmake -DCMAKE_INSTALL_PREFIX="" .. + make + popd + done +} + +package() { + for _arch in ${_architectures}; do + cd "$srcdir/$_pkgname" + pushd "build-${_arch}-static" + make DESTDIR="${pkgdir}/usr/${_arch}" install + popd + pushd "build-${_arch}" + make DESTDIR="${pkgdir}/usr/${_arch}" install + popd + mkdir -p ${pkgdir}/usr/${_arch}/include/$_pkgname + cp $_pkgname/*.h ${pkgdir}/usr/${_arch}/include/$_pkgname + ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll + ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a + done +} |