summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMichel Zou2021-03-01 13:48:16 +0100
committerMichel Zou2021-03-01 13:48:16 +0100
commit998b7ad315cb71bfa4545885273b8f490bea4529 (patch)
treee5c7ef7ea09d77e08ce26dced084b73392eaec9a /PKGBUILD
downloadaur-mingw-w64-tinyobjloader.tar.gz
2.0.0rc7
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 33 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..3622964ac8c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+pkgname=mingw-w64-tinyobjloader
+pkgver=2.0.0rc7
+pkgrel=1
+pkgdesc="Tiny but powerful single file wavefront obj loader (mingw-w64)"
+arch=('any')
+url="https://github.com/tinyobjloader/tinyobjloader"
+license=('MIT')
+depends=('mingw-w64-crt')
+makedepends=('mingw-w64-cmake')
+options=('!buildflags' 'staticlibs' '!strip')
+source=("$url/archive/v$pkgver.tar.gz")
+sha256sums=('f0246420235933d23715dd7d61e08d8b92ca896b5476dbef556d8b6270a275a3')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+build() {
+ cd "$srcdir/tinyobjloader-$pkgver"
+ for _arch in ${_architectures}; do
+ mkdir -p build-${_arch} && pushd build-${_arch}
+ ${_arch}-cmake ..
+ make
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "$srcdir/tinyobjloader-${pkgver}/build-${_arch}"
+ make DESTDIR="$pkgdir" install
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ done
+}