updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / mingw32-zlib / PKGBUILD
blob60db00e7e9de137e390c57135c3784421fd2dba3
1 # Maintainer: Mikael Eriksson <mikael_eriksson@miffe.org>
3 pkgname=mingw32-zlib
4 pkgver=1.2.5
5 pkgrel=4
6 pkgdesc="A compression/decompression Library (mingw32)"
7 arch=('any')
8 license=('custom:zlib')
9 depends=(mingw32-runtime)
10 makedepends=(mingw32-gcc)
11 url="http://www.zlib.net/"
12 source=("http://zlib.net/zlib-${pkgver}.tar.gz")
13 provides=('mingw32-zlib-static')
14 conflicts=('mingw32-zlib-static')
15 options=(!strip)
16 md5sums=('c735eab2d659a96e5a594c9e8541ad63')
18 build() {
19   cd "$srcdir/zlib-$pkgver"
21   unset LDFLAGS
23   sed -ie "s,dllwrap,i486-mingw32-dllwrap," win32/Makefile.gcc
25   ./configure --prefix=/usr/i486-mingw32 -shared -static
26   make -f win32/Makefile.gcc \
27     CC=i486-mingw32-gcc \
28     AR=i486-mingw32-ar \
29     RC=i486-mingw32-windres \
30     STRIP=i486-mingw32-strip \
31     IMPLIB=libz.dll.a \
32     CFLAGS="-DNO_FSEEKO -Wall -O3" \
33     || return 1
35   install -d "$pkgdir/usr/i486-mingw32/"{bin,include,lib}
36   install -m644 -t "$pkgdir/usr/i486-mingw32/include" zlib.h zconf.h
37   install -m644 -t "$pkgdir/usr/i486-mingw32/lib" libz.a libz.dll.a
38   install -m644 -t "$pkgdir/usr/i486-mingw32/bin" zlib1.dll
40   install -d "$pkgdir/usr/i486-mingw32/lib/pkgconfig"
42   sed "s,@prefix@,/usr/i486-mingw32,;s,@exec_prefix@,\${prefix},;s,@libdir@,\${exec_prefix}/lib,;s,@sharedlibdir@,\${libdir},;s,@includedir@,\${prefix}/include,;s,@VERSION@,$pkgver," <zlib.pc.in >"$pkgdir/usr/i486-mingw32/lib/pkgconfig/zlib.pc"
45 # vim:set ts=2 sw=2 et: