1 | Summary: The zlib compression and decompression library.
|
---|
2 | Name: zlib
|
---|
3 | Version: 1.2.5
|
---|
4 | Release: 3%{?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 | %prep
|
---|
31 | %setup -q
|
---|
32 | %patch0 -p0 -b .os2~
|
---|
33 |
|
---|
34 | # Use optflags_lib for this package if defined.
|
---|
35 | %{expand:%%define optflags %{?optflags_lib:%optflags_lib}%{!?optflags_lib:%optflags} -Wall}
|
---|
36 |
|
---|
37 | %build
|
---|
38 | # first build and test static zlib
|
---|
39 | export TEST_LDFLAGS="-Zomf"
|
---|
40 | CFLAGS="%optflags" \
|
---|
41 | ./configure --prefix=/@unixroot/usr --static
|
---|
42 |
|
---|
43 | ! grep -wE 'NO_vsnprintf|HAS_vsprintf_void|HAS_vsnprintf_void|NO_snprintf|HAS_sprintf_void|HAS_snprintf_void' Makefile
|
---|
44 | %__make
|
---|
45 | %__make z.dll
|
---|
46 |
|
---|
47 | %{!?_without_check:%{!?_without_test:%__make test}}
|
---|
48 | rm -f *.s *.o
|
---|
49 |
|
---|
50 | # next build and test shared zlib
|
---|
51 | #CFLAGS="%optflags -fPIC" ./configure --prefix=%_prefix --shared
|
---|
52 | #! grep -wE 'NO_vsnprintf|HAS_vsprintf_void|HAS_vsnprintf_void|NO_snprintf|HAS_sprintf_void|HAS_snprintf_void' Makefile
|
---|
53 | #%__make
|
---|
54 | #%{!?_without_check:%{!?_without_test:%__make test}}
|
---|
55 |
|
---|
56 | #bzip2 -9fk ChangeLog FAQ algorithm.txt
|
---|
57 |
|
---|
58 | %install
|
---|
59 | rm -rf %buildroot
|
---|
60 | mkdir -p %buildroot%_libdir
|
---|
61 | mkdir -p %buildroot%_includedir
|
---|
62 | mkdir -p %buildroot%_mandir/man3
|
---|
63 |
|
---|
64 | cp -a libz.a %buildroot%_libdir/
|
---|
65 | cp -a libz_s.a %buildroot%_libdir/
|
---|
66 | cp -a z.dll %buildroot%_libdir/
|
---|
67 |
|
---|
68 | install -p -m644 zlib.h zconf.h %buildroot%_includedir/
|
---|
69 | install -p -m644 zlib.3 %buildroot%_mandir/man3/
|
---|
70 |
|
---|
71 | %define docdir %_docdir/%name-%version
|
---|
72 | mkdir -p %buildroot%docdir
|
---|
73 | install -p -m644 README \
|
---|
74 | example.c minigzip.c %buildroot%docdir/
|
---|
75 | # License {FAQ,ChangeLog,algorithm.txt}.bz2
|
---|
76 |
|
---|
77 | %files
|
---|
78 | %defattr(-,root,root)
|
---|
79 | %_libdir/z.dll
|
---|
80 | %dir %docdir
|
---|
81 | #%docdir/License
|
---|
82 | %docdir/README
|
---|
83 |
|
---|
84 | %files devel
|
---|
85 | %defattr(-,root,root)
|
---|
86 | %_libdir/*.a
|
---|
87 | %_libdir/z.dll
|
---|
88 | %_includedir/*
|
---|
89 | %_mandir/man?/*
|
---|
90 | %dir %docdir
|
---|
91 | %docdir/*.c
|
---|
92 | #%docdir/*.bz2
|
---|
93 |
|
---|
94 | %changelog
|
---|