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: c0448fb7be85bc1caa87bc2fe5ab5ff8
14 Patch0: %{name}-pc.patch
15 URL: https://libzip.org/
16 BuildRequires: bzip2-devel
17 BuildRequires: cmake >= 3.0.2
19 # also mbedtls >= 1.0 supported
20 %{?with_gnutls:BuildRequires: gnutls-devel}
21 %{?with_gnutls:BuildRequires: nettle-devel >= 3.0}
22 %{!?with_gnutls:BuildRequires: openssl-devel}
23 BuildRequires: rpmbuild(macros) >= 1.605
24 BuildRequires: tar >= 1:1.22
26 BuildRequires: xz-devel >= 1:5.2
27 BuildRequires: zlib-devel >= 1.1.2
28 BuildRequires: zstd-devel
29 Requires: zlib >= 1.1.2
30 Requires: xz-libs >= 1:5.2
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 libzip is a C library for reading, creating, and modifying zip
35 archives. Files can be added from data buffers, files or compressed
36 data copied directly from other zip archives. Changes made without
37 closing the archive can be reverted.
39 %description -l pl.UTF-8
40 libzip jest biblioteką C do odczytu, zapisu i modyfikacji archiwów
41 zip. Pliki mogą być dodawane z buforów, plików lub skompresowanych
42 danych kopiowanych bezpośrednio z innych archiwów zip. Wykonane zmiany
43 mogą zostać cofnięte przed zamknięciem archiwum.
46 Summary: Header files for libzip library
47 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libzip
48 Group: Development/Libraries
49 Requires: %{name} = %{version}-%{release}
51 %{?with_gnutls:Requires: gnutls-devel}
52 %{?with_gnutls:Requires: nettle-devel >= 3.0}
53 %{!?with_gnutls:Requires: openssl-devel}
54 Requires: xz-devel >= 1:5.2
55 Requires: zlib-devel >= 1.1.2
56 Obsoletes: libzip-static < 1.4.0
59 Header files for libzip library.
61 %description devel -l pl.UTF-8
62 Pliki nagłówkowe biblioteki libzip.
71 # .pc file generation expects dirs relative to CMAKE_INSTALL_PREFIX
73 -DCMAKE_INSTALL_BINDIR=bin \
74 -DCMAKE_INSTALL_INCLUDEDIR=include \
75 -DCMAKE_INSTALL_LIBDIR=%{_lib} \
76 -DENABLE_COMMONCRYPTO=OFF \
77 %{!?with_gnutls:-DENABLE_GNUTLS=OFF} \
78 %{?with_gnutls:-DENABLE_OPENSSL=OFF}
83 rm -rf $RPM_BUILD_ROOT
85 %{__make} -C build install \
86 DESTDIR=$RPM_BUILD_ROOT
89 rm -rf $RPM_BUILD_ROOT
91 %post -p /sbin/ldconfig
92 %postun -p /sbin/ldconfig
95 %defattr(644,root,root,755)
96 %doc AUTHORS LICENSE NEWS.md README.md THANKS
97 %attr(755,root,root) %{_bindir}/zipcmp
98 %attr(755,root,root) %{_bindir}/zipmerge
99 %attr(755,root,root) %{_bindir}/ziptool
100 %attr(755,root,root) %{_libdir}/libzip.so.*.*
101 %attr(755,root,root) %ghost %{_libdir}/libzip.so.5
102 %{_mandir}/man1/zipcmp.1*
103 %{_mandir}/man1/zipmerge.1*
104 %{_mandir}/man1/ziptool.1*
107 %defattr(644,root,root,755)
108 %doc API-CHANGES.md TODO.md
109 %attr(755,root,root) %{_libdir}/libzip.so
111 %{_includedir}/zipconf.h
112 %{_libdir}/cmake/libzip
113 %{_pkgconfigdir}/libzip.pc
114 %{_mandir}/man3/ZIP_SOURCE_GET_ARGS.3*
115 %{_mandir}/man3/libzip.3*
116 %{_mandir}/man3/zip_*.3*