3 %bcond_with gnutls # GnuTLS instead of OpenSSL for AES
5 Summary: C library for reading, creating, and modifying zip archives
6 Summary(pl.UTF-8): Biblioteka C do odczytu, zapisu i modyfikacji archiwów zip
12 Source0: https://libzip.org/download/%{name}-%{version}.tar.xz
13 # Source0-md5: 6fe665aa6d6bf3a99eb6fa9c553283fd
14 URL: https://libzip.org/
15 BuildRequires: bzip2-devel
16 BuildRequires: cmake >= 3.0.2
18 %{?with_gnutls:BuildRequires: gnutls-devel}
19 %{?with_gnutls:BuildRequires: nettle-devel}
20 %{!?with_gnutls:BuildRequires: openssl-devel}
21 BuildRequires: tar >= 1:1.22
23 BuildRequires: zlib-devel >= 1.1.2
24 Requires: zlib >= 1.1.2
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 libzip is a C library for reading, creating, and modifying zip
29 archives. Files can be added from data buffers, files or compressed
30 data copied directly from other zip archives. Changes made without
31 closing the archive can be reverted.
33 %description -l pl.UTF-8
34 libzip jest biblioteką C do odczytu, zapisu i modyfikacji archiwów
35 zip. Pliki mogą być dodawane z buforów, plików lub skompresowanych
36 danych kopiowanych bezpośrednio z innych archiwów zip. Wykonane zmiany
37 mogą zostać cofnięte przed zamknięciem archiwum.
40 Summary: Header files for libzip library
41 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libzip
42 Group: Development/Libraries
43 Requires: %{name} = %{version}-%{release}
45 Requires: zlib-devel >= 1.1.2
46 Obsoletes: libzip-static < 1.4.0
49 Header files for libzip library.
51 %description devel -l pl.UTF-8
52 Pliki nagłówkowe biblioteki libzip.
60 # .pc file generation expects dirs relative to CMAKE_INSTALL_PREFIX
62 -DCMAKE_INSTALL_BINDIR=bin \
63 -DCMAKE_INSTALL_INCLUDEDIR=include \
64 -DCMAKE_INSTALL_LIBDIR=%{_lib} \
65 -DENABLE_COMMONCRYPTO=OFF \
66 %{!?with_gnutls:-DENABLE_GNUTLS=OFF} \
67 %{?with_gnutls:-DENABLE_OPENSSL=OFF}
72 rm -rf $RPM_BUILD_ROOT
74 %{__make} -C build install \
75 DESTDIR=$RPM_BUILD_ROOT
78 rm -rf $RPM_BUILD_ROOT
80 %post -p /sbin/ldconfig
81 %postun -p /sbin/ldconfig
84 %defattr(644,root,root,755)
85 %doc AUTHORS LICENSE NEWS.md README.md THANKS
86 %attr(755,root,root) %{_bindir}/zipcmp
87 %attr(755,root,root) %{_bindir}/zipmerge
88 %attr(755,root,root) %{_bindir}/ziptool
89 %attr(755,root,root) %{_libdir}/libzip.so.*.*
90 %attr(755,root,root) %ghost %{_libdir}/libzip.so.5
91 %{_mandir}/man1/zipcmp.1*
92 %{_mandir}/man1/zipmerge.1*
93 %{_mandir}/man1/ziptool.1*
96 %defattr(644,root,root,755)
97 %doc API-CHANGES.md TODO.md
98 %attr(755,root,root) %{_libdir}/libzip.so
100 %{_includedir}/zipconf.h
101 %{_pkgconfigdir}/libzip.pc
102 %{_mandir}/man3/ZIP_SOURCE_GET_ARGS.3*
103 %{_mandir}/man3/libzip.3*
104 %{_mandir}/man3/zip_*.3*