]> git.pld-linux.org Git - packages/libzip.git/blob - libzip.spec
- updated to 1.8.0
[packages/libzip.git] / libzip.spec
1 #
2 # Conditional build:
3 %bcond_with     gnutls  # GnuTLS instead of OpenSSL for AES
4
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
7 Name:           libzip
8 Version:        1.8.0
9 Release:        1
10 License:        BSD
11 Group:          Libraries
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
18 BuildRequires:  groff
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
25 BuildRequires:  xz
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)
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
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.
44
45 %package devel
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}
50 Requires:       bzip2-devel
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
57
58 %description devel
59 Header files for libzip library.
60
61 %description devel -l pl.UTF-8
62 Pliki nagłówkowe biblioteki libzip.
63
64 %prep
65 %setup -q
66 %patch0 -p1
67
68 %build
69 install -d build
70 cd build
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
80 %{__make}
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 %{__make} -C build install \
86         DESTDIR=$RPM_BUILD_ROOT
87
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)
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*
105
106 %files devel
107 %defattr(644,root,root,755)
108 %doc API-CHANGES.md TODO.md
109 %attr(755,root,root) %{_libdir}/libzip.so
110 %{_includedir}/zip.h
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*
This page took 0.105935 seconds and 3 git commands to generate.