]>
Commit | Line | Data |
---|---|---|
48e5daac JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with gnutls # GnuTLS instead of OpenSSL for AES | |
4 | ||
01f8639f | 5 | Summary: C library for reading, creating, and modifying zip archives |
717e415e | 6 | Summary(pl.UTF-8): Biblioteka C do odczytu, zapisu i modyfikacji archiwów zip |
01f8639f | 7 | Name: libzip |
d6b0a072 JB |
8 | Version: 1.8.0 |
9 | Release: 1 | |
01f8639f MB |
10 | License: BSD |
11 | Group: Libraries | |
48e5daac | 12 | Source0: https://libzip.org/download/%{name}-%{version}.tar.xz |
d6b0a072 JB |
13 | # Source0-md5: c0448fb7be85bc1caa87bc2fe5ab5ff8 |
14 | Patch0: %{name}-pc.patch | |
48e5daac JB |
15 | URL: https://libzip.org/ |
16 | BuildRequires: bzip2-devel | |
17 | BuildRequires: cmake >= 3.0.2 | |
18 | BuildRequires: groff | |
d6b0a072 | 19 | # also mbedtls >= 1.0 supported |
48e5daac | 20 | %{?with_gnutls:BuildRequires: gnutls-devel} |
6e3f4812 | 21 | %{?with_gnutls:BuildRequires: nettle-devel >= 3.0} |
48e5daac | 22 | %{!?with_gnutls:BuildRequires: openssl-devel} |
6e3f4812 | 23 | BuildRequires: rpmbuild(macros) >= 1.605 |
916db4c0 JB |
24 | BuildRequires: tar >= 1:1.22 |
25 | BuildRequires: xz | |
6e3f4812 | 26 | BuildRequires: xz-devel >= 1:5.2 |
01f8639f | 27 | BuildRequires: zlib-devel >= 1.1.2 |
d6b0a072 | 28 | BuildRequires: zstd-devel |
58a1b755 | 29 | Requires: zlib >= 1.1.2 |
6e3f4812 | 30 | Requires: xz-libs >= 1:5.2 |
01f8639f MB |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | %description | |
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. | |
38 | ||
4f9ddb84 JR |
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. | |
01f8639f MB |
44 | |
45 | %package devel | |
46 | Summary: Header files for libzip library | |
717e415e | 47 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libzip |
01f8639f MB |
48 | Group: Development/Libraries |
49 | Requires: %{name} = %{version}-%{release} | |
48e5daac | 50 | Requires: bzip2-devel |
6e3f4812 JB |
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 | |
d11404a8 | 55 | Requires: zlib-devel >= 1.1.2 |
85497929 | 56 | Obsoletes: libzip-static < 1.4.0 |
01f8639f MB |
57 | |
58 | %description devel | |
59 | Header files for libzip library. | |
60 | ||
4f9ddb84 JR |
61 | %description devel -l pl.UTF-8 |
62 | Pliki nagłówkowe biblioteki libzip. | |
01f8639f | 63 | |
01f8639f MB |
64 | %prep |
65 | %setup -q | |
d6b0a072 | 66 | %patch0 -p1 |
01f8639f MB |
67 | |
68 | %build | |
8acd80d1 AM |
69 | install -d build |
70 | cd build | |
48e5daac JB |
71 | # .pc file generation expects dirs relative to CMAKE_INSTALL_PREFIX |
72 | %cmake .. \ | |
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} | |
79 | ||
01f8639f MB |
80 | %{__make} |
81 | ||
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
01f8639f | 84 | |
8acd80d1 AM |
85 | %{__make} -C build install \ |
86 | DESTDIR=$RPM_BUILD_ROOT | |
6487f921 | 87 | |
01f8639f MB |
88 | %clean |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
91 | %post -p /sbin/ldconfig | |
92 | %postun -p /sbin/ldconfig | |
93 | ||
94 | %files | |
95 | %defattr(644,root,root,755) | |
48e5daac | 96 | %doc AUTHORS LICENSE NEWS.md README.md THANKS |
01f8639f MB |
97 | %attr(755,root,root) %{_bindir}/zipcmp |
98 | %attr(755,root,root) %{_bindir}/zipmerge | |
8e4c4949 | 99 | %attr(755,root,root) %{_bindir}/ziptool |
8acd80d1 | 100 | %attr(755,root,root) %{_libdir}/libzip.so.*.* |
a9097b68 | 101 | %attr(755,root,root) %ghost %{_libdir}/libzip.so.5 |
82a837b4 JB |
102 | %{_mandir}/man1/zipcmp.1* |
103 | %{_mandir}/man1/zipmerge.1* | |
8e4c4949 | 104 | %{_mandir}/man1/ziptool.1* |
01f8639f MB |
105 | |
106 | %files devel | |
107 | %defattr(644,root,root,755) | |
8acd80d1 | 108 | %doc API-CHANGES.md TODO.md |
01f8639f MB |
109 | %attr(755,root,root) %{_libdir}/libzip.so |
110 | %{_includedir}/zip.h | |
8acd80d1 | 111 | %{_includedir}/zipconf.h |
6e3f4812 | 112 | %{_libdir}/cmake/libzip |
01f8639f | 113 | %{_pkgconfigdir}/libzip.pc |
58a1b755 | 114 | %{_mandir}/man3/ZIP_SOURCE_GET_ARGS.3* |
82a837b4 JB |
115 | %{_mandir}/man3/libzip.3* |
116 | %{_mandir}/man3/zip_*.3* |