diff options
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 45 | ||||
-rw-r--r-- | fix-headers.patch | 15 |
3 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..179495583886 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = mingw-w64-libzip + pkgdesc = A C library for reading, creating, and modifying zip archives (mingw-w64) + pkgver = 0.11.1 + pkgrel = 4 + url = http://www.nih.at/libzip/index.html + arch = any + license = BSD + makedepends = mingw-w64-configure + depends = mingw-w64-crt + depends = mingw-w64-zlib + options = staticlibs + options = !buildflags + options = !strip + source = http://www.nih.at/libzip/libzip-0.11.1.tar.xz + source = fix-headers.patch + md5sums = 87d5ec3629f6ad2a4b01ad961e7f0c19 + md5sums = 249395bd3a426c4c4e993e9d4753e1dd + +pkgname = mingw-w64-libzip + 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 +} + diff --git a/fix-headers.patch b/fix-headers.patch new file mode 100644 index 000000000000..75917107025c --- /dev/null +++ b/fix-headers.patch @@ -0,0 +1,15 @@ +diff -urN libzip-0.10rc1.old/lib/Makefile.am libzip-0.10rc1/lib/Makefile.am +--- libzip-0.10rc1.old/lib/Makefile.am 2011-03-05 01:07:33.921722002 +0100 ++++ libzip-0.10rc1/lib/Makefile.am 2011-03-05 20:29:30.349388003 +0100 +@@ -2,8 +2,9 @@ + + lib_LTLIBRARIES = libzip.la + noinst_HEADERS = zipint.h +-include_HEADERS = zip.h +-libinclude_HEADERS = zipconf.h ++include_HEADERS = \ ++ zip.h \ ++ zipconf.h + + # also update CMakeLists.txt when changing version + libzip_la_LDFLAGS=-no-undefined -version-info 2:0 |