blob: 2a40dd2dd6d10e467d4121fb62dbcb5f54e43b47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
%define keepstatic 1
Name: zlib
Provides: libz
Obsoletes: libz
Version: 1.3
Release: 0
Summary: Data Compression Library
License: Zlib
Group: Base/Libraries
Url: http://www.zlib.net/
#X-Vcs-Url: https://github.com/madler/zlib.git
Source: http://zlib.net/zlib-%{version}.tar.bz2
Source1: LICENSE
Source2: baselibs.conf
Source1001: zlib.manifest
BuildRequires: pkgconfig
%description
ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt
(deflate format) and rfc1952.txt (gzip format). These documents are
also available in other formats from
ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html.
%package devel
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries
Requires: glibc-devel
Requires: zlib = %{version}
Provides: libz:/usr/include/zlib.h
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require the provided includes and
libraries.
%package devel-static
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries
Requires: %{name}-devel = %{version}
Provides: %{name}-devel:%{_libdir}/libz.a
%description devel-static
This package contains all necessary include files and libraries needed
to develop applications that require the provided includes and
libraries.
%package -n minizip
Summary: Manipulates files from a .zip archive
Group: System/Libraries
Requires: %{name} = %{version}-%{release}
%description -n minizip
Minizip is a tool to manipulates files from a .zip archive.
%package -n minizip-devel
Summary: Development files for the minizip library
Group: Development/Libraries
Requires: minizip = %{version}-%{release}
%description -n minizip-devel
This package contains the libraries and header files needed for
developing applications which use minizip.
%prep
%setup -q
cp %{SOURCE1} .
cp %{SOURCE1001} .
%build
export LDFLAGS="-Wl,-z,relro,-z,now"
export CFLAGS="%{optflags}"
./configure --shared --prefix=%{_prefix} --libdir=/%{_lib}
%__make %{?_smp_mflags}
cd contrib/minizip
%reconfigure
%__make %{?_smp_mflags}
%check
# rm -f /tmp/%{name}_test
# %%__make check | tee -i /tmp/%{name}_log
%install
#mkdir -p %%{buildroot}%%{_mandir}/man3
mkdir -p %{buildroot}%{_libdir}
%make_install
pushd %{buildroot}%{_libdir}
ln -sf -v ../../%{_lib}/$(readlink %{buildroot}/%{_lib}/libz.so) %{buildroot}%{_libdir}/libz.so
popd
rm -v %{buildroot}/%{_lib}/libz.so
# static lib
mv %{buildroot}/%{_lib}/libz.a %{buildroot}%{_libdir}
# Move .pc file to %%{_libdir}
mv %{buildroot}/%{_lib}/pkgconfig %{buildroot}%{_libdir}
# manpage
install -m 644 zlib.3 %{buildroot}%{_mandir}/man3
install -m 644 zutil.h %{buildroot}%{_includedir}
pushd contrib/minizip
%make_install
rm -rf %{buildroot}%{_libdir}/libminizip.a
rm -rf %{buildroot}%{_libdir}/libminizip.la
popd
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n minizip -p /sbin/ldconfig
%postun -n minizip -p /sbin/ldconfig
%files
%manifest %{name}.manifest
%license LICENSE
/%{_lib}/libz.so.*
%files devel
%manifest %{name}.manifest
%doc README
%license LICENSE
%{_mandir}/man3/zlib.3.gz
%{_includedir}/zlib.h
%{_includedir}/zconf.h
%{_includedir}/zutil.h
%{_libdir}/libz.so
%{_libdir}/pkgconfig/zlib.pc
%files devel-static
%manifest %{name}.manifest
%license LICENSE
%{_libdir}/libz.a
%files -n minizip
%manifest %{name}.manifest
%license LICENSE
%{_libdir}/libminizip.so.*
%files -n minizip-devel
%manifest %{name}.manifest
%license LICENSE
%{_includedir}/minizip/*.h
%{_libdir}/libminizip.so
%{_libdir}/pkgconfig/minizip.pc
|