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: c0185e10023963bbec0e0002ab39d981
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 >= 3.0}
20 %{!?with_gnutls:BuildRequires: openssl-devel}
21 BuildRequires: rpmbuild(macros) >= 1.605
22 BuildRequires: tar >= 1:1.22
24 BuildRequires: xz-devel >= 1:5.2
25 BuildRequires: zlib-devel >= 1.1.2
26 Requires: zlib >= 1.1.2
27 Requires: xz-libs >= 1:5.2
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 libzip is a C library for reading, creating, and modifying zip
32 archives. Files can be added from data buffers, files or compressed
33 data copied directly from other zip archives. Changes made without
34 closing the archive can be reverted.
36 %description -l pl.UTF-8
37 libzip jest biblioteką C do odczytu, zapisu i modyfikacji archiwów
38 zip. Pliki mogą być dodawane z buforów, plików lub skompresowanych
39 danych kopiowanych bezpośrednio z innych archiwów zip. Wykonane zmiany
40 mogą zostać cofnięte przed zamknięciem archiwum.
43 Summary: Header files for libzip library
44 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libzip
45 Group: Development/Libraries
46 Requires: %{name} = %{version}-%{release}
48 %{?with_gnutls:Requires: gnutls-devel}
49 %{?with_gnutls:Requires: nettle-devel >= 3.0}
50 %{!?with_gnutls:Requires: openssl-devel}
51 Requires: xz-devel >= 1:5.2
52 Requires: zlib-devel >= 1.1.2
53 Obsoletes: libzip-static < 1.4.0
56 Header files for libzip library.
58 %description devel -l pl.UTF-8
59 Pliki nagłówkowe biblioteki libzip.
67 # .pc file generation expects dirs relative to CMAKE_INSTALL_PREFIX
69 -DCMAKE_INSTALL_BINDIR=bin \
70 -DCMAKE_INSTALL_INCLUDEDIR=include \
71 -DCMAKE_INSTALL_LIBDIR=%{_lib} \
72 -DENABLE_COMMONCRYPTO=OFF \
73 %{!?with_gnutls:-DENABLE_GNUTLS=OFF} \
74 %{?with_gnutls:-DENABLE_OPENSSL=OFF}
79 rm -rf $RPM_BUILD_ROOT
81 %{__make} -C build install \
82 DESTDIR=$RPM_BUILD_ROOT
85 rm -rf $RPM_BUILD_ROOT
87 %post -p /sbin/ldconfig
88 %postun -p /sbin/ldconfig
91 %defattr(644,root,root,755)
92 %doc AUTHORS LICENSE NEWS.md README.md THANKS
93 %attr(755,root,root) %{_bindir}/zipcmp
94 %attr(755,root,root) %{_bindir}/zipmerge
95 %attr(755,root,root) %{_bindir}/ziptool
96 %attr(755,root,root) %{_libdir}/libzip.so.*.*
97 %attr(755,root,root) %ghost %{_libdir}/libzip.so.5
98 %{_mandir}/man1/zipcmp.1*
99 %{_mandir}/man1/zipmerge.1*
100 %{_mandir}/man1/ziptool.1*
103 %defattr(644,root,root,755)
104 %doc API-CHANGES.md TODO.md
105 %attr(755,root,root) %{_libdir}/libzip.so
107 %{_includedir}/zipconf.h
108 %{_libdir}/cmake/libzip
109 %{_pkgconfigdir}/libzip.pc
110 %{_mandir}/man3/ZIP_SOURCE_GET_ARGS.3*
111 %{_mandir}/man3/libzip.3*
112 %{_mandir}/man3/zip_*.3*