1 |
%define major 2 |
2 |
%define libname %mklibname zip %{major} |
3 |
%define develname %mklibname zip -d |
4 |
|
5 |
Summary: A C library for reading, creating, and modifying zip archives |
6 |
Name: libzip |
7 |
Version: 0.10 |
8 |
Release: %mkrel 1 |
9 |
Group: System/Libraries |
10 |
License: BSD |
11 |
URL: http://www.nih.at/libzip/ |
12 |
Source0: http://www.nih.at/libzip/%{name}-%{version}.tar.bz2 |
13 |
Patch0: libzip-0.10-fix_pkgconfig.patch |
14 |
Patch1: libzip-0.10_rc1-fix_headers.patch |
15 |
BuildRequires: libtool |
16 |
BuildRequires: zlib-devel |
17 |
|
18 |
%description |
19 |
libzip is a C library for reading, creating, and modifying zip archives. Files |
20 |
can be added from data buffers, files, or compressed data copied directly from |
21 |
other zip archives. Changes made without closing the archive can be reverted. |
22 |
The API is documented by man pages. |
23 |
|
24 |
%package -n %{libname} |
25 |
Summary: A C library for reading, creating, and modifying zip archives |
26 |
Group: System/Libraries |
27 |
|
28 |
%description -n %{libname} |
29 |
libzip is a C library for reading, creating, and modifying zip archives. Files |
30 |
can be added from data buffers, files, or compressed data copied directly from |
31 |
other zip archives. Changes made without closing the archive can be reverted. |
32 |
The API is documented by man pages. |
33 |
|
34 |
%package -n %{develname} |
35 |
Summary: Static library and header files for the %{name} library |
36 |
Group: Development/C |
37 |
Requires: %{name} = %{version} |
38 |
Requires: %{libname} = %{version} |
39 |
Provides: %{name}-devel = %{version} |
40 |
Provides: lib%{name}-devel = %{version} |
41 |
Obsoletes: %{mklibname zip 1}-devel |
42 |
|
43 |
%description -n %{develname} |
44 |
libzip is a C library for reading, creating, and modifying zip archives. Files |
45 |
can be added from data buffers, files, or compressed data copied directly from |
46 |
other zip archives. Changes made without closing the archive can be reverted. |
47 |
The API is documented by man pages. |
48 |
|
49 |
This package contains the static %{name} library and its header files. |
50 |
|
51 |
%prep |
52 |
%setup -q -n %{name}-%{version} |
53 |
%patch0 -p1 |
54 |
%patch1 -p1 |
55 |
|
56 |
# fix test return state |
57 |
sed -i -e 's:19/2:19/0:' regress/open_nonarchive.test |
58 |
|
59 |
%build |
60 |
autoreconf -fi |
61 |
%configure2_5x --disable-static |
62 |
%make |
63 |
|
64 |
%check |
65 |
make check |
66 |
|
67 |
%install |
68 |
rm -rf %{buildroot} |
69 |
|
70 |
%makeinstall_std |
71 |
|
72 |
rm -f %{buildroot}%{_libdir}/*.la |
73 |
|
74 |
%clean |
75 |
rm -rf %{buildroot} |
76 |
|
77 |
%files |
78 |
%defattr(-,root,root) |
79 |
%doc AUTHORS NEWS README THANKS TODO |
80 |
%{_bindir}/zipcmp |
81 |
%{_bindir}/zipmerge |
82 |
%{_bindir}/ziptorrent |
83 |
%{_mandir}/man1/zipcmp.1* |
84 |
%{_mandir}/man1/zipmerge.1* |
85 |
%{_mandir}/man1/ziptorrent.1* |
86 |
|
87 |
%files -n %{libname} |
88 |
%defattr(-,root,root) |
89 |
%doc AUTHORS NEWS README THANKS TODO |
90 |
%{_libdir}/lib*.so.%{major}* |
91 |
|
92 |
%files -n %{develname} |
93 |
%defattr(-,root,root) |
94 |
%{_includedir}/* |
95 |
%{_libdir}/*.so |
96 |
%{_libdir}/pkgconfig/libzip.pc |
97 |
%{_mandir}/man3/* |