source: spec/trunk/SPECS/zlib.spec@ 788

Last change on this file since 788 was 661, checked in by Yuri Dario, 10 years ago

spec: zlib, added .pc file to distribution.

  • Property svn:eol-style set to native
File size: 3.0 KB
Line 
1Summary: The zlib compression and decompression library.
2Name: zlib
3Version: 1.2.5
4Release: 6%{?dist}
5License: BSD
6Group: System Environment/Libraries
7URL: http://www.zlib.net
8Source: %url/zlib-%version.tar.bz2
9Patch0: zlib-os2.diff
10Prefix: %_prefix
11BuildRoot: /override/%name-%version
12
13%description
14The zlib compression library provides in-memory compression and
15decompression functions, including integrity checks of the uncompressed
16data. This version of the library supports only one compression method
17(deflation), but other algorithms may be added later, which will have
18the same stream interface. The zlib library is used by many different
19system programs.
20
21%package devel
22Summary: Header files and libraries for developing apps which will use zlib.
23Group: Development/Libraries
24Requires: %name = %version-%release
25
26%description devel
27The zlib-devel package contains the header files and libraries needed to
28develop programs that use the zlib compression and decompression library.
29
30%package debug
31Summary: HLL debug data for exception handling support.
32
33%description debug
34HLL 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
47export TEST_LDFLAGS="-Zomf"
48CFLAGS="%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}}
56rm -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
67rm -rf %buildroot
68mkdir -p %buildroot%_libdir
69mkdir -p %buildroot%_libdir/pkgconfig
70mkdir -p %buildroot%_includedir
71mkdir -p %buildroot%_mandir/man3
72
73cp -a libz.a %buildroot%_libdir/
74cp -a libz_s.a %buildroot%_libdir/
75cp -a z.dll %buildroot%_libdir/
76cp -a zlib.pc %buildroot%_libdir/pkgconfig/
77
78install -p -m644 zlib.h zconf.h %buildroot%_includedir/
79install -p -m644 zlib.3 %buildroot%_mandir/man3/
80
81%define docdir %_docdir/%name-%version
82mkdir -p %buildroot%docdir
83install -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.
Note: See TracBrowser for help on using the repository browser.