summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD45
1 files changed, 45 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1fa9b19f10a9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+
+pkgname=mingw-w64-libzip
+pkgver=0.11.1
+pkgrel=4
+pkgdesc="A C library for reading, creating, and modifying zip archives (mingw-w64)"
+url="http://www.nih.at/libzip/index.html"
+license=('BSD')
+arch=(any)
+depends=('mingw-w64-crt' 'mingw-w64-zlib')
+makedepends=('mingw-w64-configure')
+options=('staticlibs' '!buildflags' '!strip')
+source=("http://www.nih.at/libzip/libzip-${pkgver}.tar.xz"
+ 'fix-headers.patch')
+md5sums=('87d5ec3629f6ad2a4b01ad961e7f0c19'
+ '249395bd3a426c4c4e993e9d4753e1dd')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "$srcdir/libzip-${pkgver}"
+ patch -p1 -i "$srcdir/fix-headers.patch"
+ autoreconf -vfi
+}
+
+build() {
+ cd "$srcdir/libzip-${pkgver}"
+ for _arch in ${_architectures}; do
+ mkdir -p build-${_arch} && pushd build-${_arch}
+ ${_arch}-configure
+ make
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "$srcdir/libzip-${pkgver}/build-$_arch"
+ make DESTDIR="${pkgdir}" install
+ rm -r "$pkgdir"/usr/${_arch}/share/
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip --strip-all "$pkgdir"/usr/${_arch}/bin/*.exe
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ done
+}
+