| 1 | Summary: The zlib compression and decompression library.
|
|---|
| 2 | Name: zlib
|
|---|
| 3 | Version: 1.2.5
|
|---|
| 4 | Release: 6%{?dist}
|
|---|
| 5 | License: BSD
|
|---|
| 6 | Group: System Environment/Libraries
|
|---|
| 7 | URL: http://www.zlib.net
|
|---|
| 8 | Source: %url/zlib-%version.tar.bz2
|
|---|
| 9 | Patch0: zlib-os2.diff
|
|---|
| 10 | Prefix: %_prefix
|
|---|
| 11 | BuildRoot: /override/%name-%version
|
|---|
| 12 |
|
|---|
| 13 | %description
|
|---|
| 14 | The zlib compression library provides in-memory compression and
|
|---|
| 15 | decompression functions, including integrity checks of the uncompressed
|
|---|
| 16 | data. This version of the library supports only one compression method
|
|---|
| 17 | (deflation), but other algorithms may be added later, which will have
|
|---|
| 18 | the same stream interface. The zlib library is used by many different
|
|---|
| 19 | system programs.
|
|---|
| 20 |
|
|---|
| 21 | %package devel
|
|---|
| 22 | Summary: Header files and libraries for developing apps which will use zlib.
|
|---|
| 23 | Group: Development/Libraries
|
|---|
| 24 | Requires: %name = %version-%release
|
|---|
| 25 |
|
|---|
| 26 | %description devel
|
|---|
| 27 | The zlib-devel package contains the header files and libraries needed to
|
|---|
| 28 | develop programs that use the zlib compression and decompression library.
|
|---|
| 29 |
|
|---|
| 30 | %package debug
|
|---|
| 31 | Summary: HLL debug data for exception handling support.
|
|---|
| 32 |
|
|---|
| 33 | %description debug
|
|---|
| 34 | HLL debug data for exception handling support.
|
|---|
| 35 |
|
|---|
| 36 | %debug_package
|
|---|
| 37 |
|
|---|
| 38 | %prep
|
|---|
| 39 | %setup -q
|
|---|
| 40 | %patch0 -p0 -b .os2~
|
|---|
| 41 |
|
|---|
| 42 | # Use optflags_lib for this package if defined.
|
|---|
| 43 | %{expand:%%define optflags %{?optflags_lib:%optflags_lib}%{!?optflags_lib:%optflags} -Wall}
|
|---|
| 44 |
|
|---|
| 45 | %build
|
|---|
| 46 | # first build and test static zlib
|
|---|
| 47 | export TEST_LDFLAGS="-Zomf"
|
|---|
| 48 | CFLAGS="%optflags" \
|
|---|
| 49 | ./configure --prefix=/@unixroot/usr --static
|
|---|
| 50 |
|
|---|
| 51 | ! grep -wE 'NO_vsnprintf|HAS_vsprintf_void|HAS_vsnprintf_void|NO_snprintf|HAS_sprintf_void|HAS_snprintf_void' Makefile
|
|---|
| 52 | %__make
|
|---|
| 53 | %__make z.dll
|
|---|
| 54 |
|
|---|
| 55 | %{!?_without_check:%{!?_without_test:%__make test}}
|
|---|
| 56 | rm -f *.s *.o
|
|---|
| 57 |
|
|---|
| 58 | # next build and test shared zlib
|
|---|
| 59 | #CFLAGS="%optflags -fPIC" ./configure --prefix=%_prefix --shared
|
|---|
| 60 | #! grep -wE 'NO_vsnprintf|HAS_vsprintf_void|HAS_vsnprintf_void|NO_snprintf|HAS_sprintf_void|HAS_snprintf_void' Makefile
|
|---|
| 61 | #%__make
|
|---|
| 62 | #%{!?_without_check:%{!?_without_test:%__make test}}
|
|---|
| 63 |
|
|---|
| 64 | #bzip2 -9fk ChangeLog FAQ algorithm.txt
|
|---|
| 65 |
|
|---|
| 66 | %install
|
|---|
| 67 | rm -rf %buildroot
|
|---|
| 68 | mkdir -p %buildroot%_libdir
|
|---|
| 69 | mkdir -p %buildroot%_libdir/pkgconfig
|
|---|
| 70 | mkdir -p %buildroot%_includedir
|
|---|
| 71 | mkdir -p %buildroot%_mandir/man3
|
|---|
| 72 |
|
|---|
| 73 | cp -a libz.a %buildroot%_libdir/
|
|---|
| 74 | cp -a libz_s.a %buildroot%_libdir/
|
|---|
| 75 | cp -a z.dll %buildroot%_libdir/
|
|---|
| 76 | cp -a zlib.pc %buildroot%_libdir/pkgconfig/
|
|---|
| 77 |
|
|---|
| 78 | install -p -m644 zlib.h zconf.h %buildroot%_includedir/
|
|---|
| 79 | install -p -m644 zlib.3 %buildroot%_mandir/man3/
|
|---|
| 80 |
|
|---|
| 81 | %define docdir %_docdir/%name-%version
|
|---|
| 82 | mkdir -p %buildroot%docdir
|
|---|
| 83 | install -p -m644 README \
|
|---|
| 84 | example.c minigzip.c %buildroot%docdir/
|
|---|
| 85 | # License {FAQ,ChangeLog,algorithm.txt}.bz2
|
|---|
| 86 |
|
|---|
| 87 | %files
|
|---|
| 88 | %defattr(-,root,root)
|
|---|
| 89 | %_libdir/z.dll
|
|---|
| 90 | %dir %docdir
|
|---|
| 91 | #docdir/License
|
|---|
| 92 | %docdir/README
|
|---|
| 93 |
|
|---|
| 94 | %files devel
|
|---|
| 95 | %defattr(-,root,root)
|
|---|
| 96 | %_libdir/*.a
|
|---|
| 97 | %_includedir/*
|
|---|
| 98 | %_mandir/man?/*
|
|---|
| 99 | %dir %docdir
|
|---|
| 100 | %docdir/*.c
|
|---|
| 101 | #docdir/*.bz2
|
|---|
| 102 | %{_libdir}/pkgconfig/*.pc
|
|---|
| 103 |
|
|---|
| 104 | %changelog
|
|---|
| 105 | * Thu Feb 18 2016 yd <yd@os2power.com> 1.2.5-6
|
|---|
| 106 | - added .pc file to distribution.
|
|---|
| 107 | - use new debug macros.
|
|---|
| 108 |
|
|---|
| 109 | * Mon Jun 02 2014 yd
|
|---|
| 110 | - remove dll from devel package.
|
|---|
| 111 | - added debug package with symbolic info for exceptq.
|
|---|
| 112 |
|
|---|
| 113 | * Mon Jan 16 2012 yd
|
|---|
| 114 | - rebuild with libc 0.6.4 runtime.
|
|---|