]>
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 |
6e3f4812 | 8 | Version: 1.7.3 |
d26c6c5d | 9 | Release: 2 |
01f8639f MB |
10 | License: BSD |
11 | Group: Libraries | |
48e5daac | 12 | Source0: https://libzip.org/download/%{name}-%{version}.tar.xz |
6e3f4812 | 13 | # Source0-md5: c0185e10023963bbec0e0002ab39d981 |
48e5daac JB |
14 | URL: https://libzip.org/ |
15 | BuildRequires: bzip2-devel | |
16 | BuildRequires: cmake >= 3.0.2 | |
17 | BuildRequires: groff | |
18 | %{?with_gnutls:BuildRequires: gnutls-devel} | |
6e3f4812 | 19 | %{?with_gnutls:BuildRequires: nettle-devel >= 3.0} |
48e5daac | 20 | %{!?with_gnutls:BuildRequires: openssl-devel} |
6e3f4812 | 21 | BuildRequires: rpmbuild(macros) >= 1.605 |
916db4c0 JB |
22 | BuildRequires: tar >= 1:1.22 |
23 | BuildRequires: xz | |
6e3f4812 | 24 | BuildRequires: xz-devel >= 1:5.2 |
01f8639f | 25 | BuildRequires: zlib-devel >= 1.1.2 |
58a1b755 | 26 | Requires: zlib >= 1.1.2 |
6e3f4812 | 27 | Requires: xz-libs >= 1:5.2 |
01f8639f MB |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
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. | |
35 | ||
4f9ddb84 JR |
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. | |
01f8639f MB |
41 | |
42 | %package devel | |
43 | Summary: Header files for libzip library | |
717e415e | 44 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libzip |
01f8639f MB |
45 | Group: Development/Libraries |
46 | Requires: %{name} = %{version}-%{release} | |
48e5daac | 47 | Requires: bzip2-devel |
6e3f4812 JB |
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 | |
d11404a8 | 52 | Requires: zlib-devel >= 1.1.2 |
85497929 | 53 | Obsoletes: libzip-static < 1.4.0 |
01f8639f MB |
54 | |
55 | %description devel | |
56 | Header files for libzip library. | |
57 | ||
4f9ddb84 JR |
58 | %description devel -l pl.UTF-8 |
59 | Pliki nagłówkowe biblioteki libzip. | |
01f8639f | 60 | |
01f8639f MB |
61 | %prep |
62 | %setup -q | |
63 | ||
64 | %build | |
8acd80d1 AM |
65 | install -d build |
66 | cd build | |
48e5daac JB |
67 | # .pc file generation expects dirs relative to CMAKE_INSTALL_PREFIX |
68 | %cmake .. \ | |
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} | |
75 | ||
01f8639f MB |
76 | %{__make} |
77 | ||
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
01f8639f | 80 | |
8acd80d1 AM |
81 | %{__make} -C build install \ |
82 | DESTDIR=$RPM_BUILD_ROOT | |
6487f921 | 83 | |
01f8639f MB |
84 | %clean |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %post -p /sbin/ldconfig | |
88 | %postun -p /sbin/ldconfig | |
89 | ||
90 | %files | |
91 | %defattr(644,root,root,755) | |
48e5daac | 92 | %doc AUTHORS LICENSE NEWS.md README.md THANKS |
01f8639f MB |
93 | %attr(755,root,root) %{_bindir}/zipcmp |
94 | %attr(755,root,root) %{_bindir}/zipmerge | |
8e4c4949 | 95 | %attr(755,root,root) %{_bindir}/ziptool |
8acd80d1 | 96 | %attr(755,root,root) %{_libdir}/libzip.so.*.* |
a9097b68 | 97 | %attr(755,root,root) %ghost %{_libdir}/libzip.so.5 |
82a837b4 JB |
98 | %{_mandir}/man1/zipcmp.1* |
99 | %{_mandir}/man1/zipmerge.1* | |
8e4c4949 | 100 | %{_mandir}/man1/ziptool.1* |
01f8639f MB |
101 | |
102 | %files devel | |
103 | %defattr(644,root,root,755) | |
8acd80d1 | 104 | %doc API-CHANGES.md TODO.md |
01f8639f MB |
105 | %attr(755,root,root) %{_libdir}/libzip.so |
106 | %{_includedir}/zip.h | |
8acd80d1 | 107 | %{_includedir}/zipconf.h |
6e3f4812 | 108 | %{_libdir}/cmake/libzip |
01f8639f | 109 | %{_pkgconfigdir}/libzip.pc |
58a1b755 | 110 | %{_mandir}/man3/ZIP_SOURCE_GET_ARGS.3* |
82a837b4 JB |
111 | %{_mandir}/man3/libzip.3* |
112 | %{_mandir}/man3/zip_*.3* |