summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD56
1 files changed, 56 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..eb7de25c5ea
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer: Michael Yang <ohmyarchlinux@gmail.com>
+
+pkgname=mingw-w64-libxlsxwriter-git
+pkgver=0.7.2.r490.cc960e7
+pkgrel=1
+pkgdesc="A C library for creating Excel XLSX files (mingw-w64)"
+arch=('any')
+url='https://libxlsxwriter.github.io'
+license=('BSD')
+makedepends=('git' 'mingw-w64-cmake' 'mingw-w64-zlib>=1.2.8')
+options=('!strip' '!buildflags' 'staticlibs')
+conflicts=('mingw-w64-libxlsxwriter')
+provides=('mingw-w64-libxlsxwriter')
+source=("git://github.com/jmcnamara/libxlsxwriter.git")
+sha512sums=('SKIP')
+
+_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
+
+pkgver() {
+ cd libxlsxwriter
+ echo "$(grep LXW_VERSION include/xlsxwriter.h | cut -d '"' -f2).r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
+}
+
+build() {
+ unset LDFLAGS
+# for _arch in ${_architectures}; do
+# mkdir -p build-${_arch} && pushd build-${_arch}
+# ${_arch}-cmake \
+# -DBUILD_STATIC=OFF \
+# -DCMAKE_BUILD_TYPE=Release \
+# ../libxlsxwriter
+# make
+# popd
+# done
+ for _arch in ${_architectures}; do
+ mkdir -p build-${_arch}-static && pushd build-${_arch}-static
+ ${_arch}-cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ ../libxlsxwriter
+ make
+ popd
+ done
+}
+
+package() {
+# for _arch in ${_architectures}; do
+# cd "${srcdir}/build-${_arch}"
+# make DESTDIR="${pkgdir}" install
+# ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+# done
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/build-${_arch}-static"
+ make DESTDIR="${pkgdir}" install
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ done
+}