]> git.pld-linux.org Git - packages/libzip.git/blob - libzip.spec
04d542a0d2625ba583ecaa281d8f4c01855bee93
[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.5.1
9 Release:        2
10 License:        BSD
11 Group:          Libraries
12 Source0:        https://libzip.org/download/%{name}-%{version}.tar.xz
13 # Source0-md5:  6fe665aa6d6bf3a99eb6fa9c553283fd
14 URL:            https://libzip.org/
15 BuildRequires:  bzip2-devel
16 BuildRequires:  cmake >= 3.0.2
17 BuildRequires:  groff
18 %{?with_gnutls:BuildRequires:   gnutls-devel}
19 %{?with_gnutls:BuildRequires:   nettle-devel}
20 %{!?with_gnutls:BuildRequires:  openssl-devel}
21 BuildRequires:  tar >= 1:1.22
22 BuildRequires:  xz
23 BuildRequires:  zlib-devel >= 1.1.2
24 Requires:       zlib >= 1.1.2
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 libzip is a C library for reading, creating, and modifying zip
29 archives. Files can be added from data buffers, files or compressed
30 data copied directly from other zip archives. Changes made without
31 closing the archive can be reverted.
32
33 %description -l pl.UTF-8
34 libzip jest biblioteką C do odczytu, zapisu i modyfikacji archiwów
35 zip. Pliki mogą być dodawane z buforów, plików lub skompresowanych
36 danych kopiowanych bezpośrednio z innych archiwów zip. Wykonane zmiany
37 mogą zostać cofnięte przed zamknięciem archiwum.
38
39 %package devel
40 Summary:        Header files for libzip library
41 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libzip
42 Group:          Development/Libraries
43 Requires:       %{name} = %{version}-%{release}
44 Requires:       bzip2-devel
45 Requires:       zlib-devel >= 1.1.2
46 Obsoletes:      libzip-static < 1.4.0
47
48 %description devel
49 Header files for libzip library.
50
51 %description devel -l pl.UTF-8
52 Pliki nagłówkowe biblioteki libzip.
53
54 %prep
55 %setup -q
56
57 %build
58 install -d build
59 cd build
60 # .pc file generation expects dirs relative to CMAKE_INSTALL_PREFIX
61 %cmake .. \
62         -DCMAKE_INSTALL_BINDIR=bin \
63         -DCMAKE_INSTALL_INCLUDEDIR=include \
64         -DCMAKE_INSTALL_LIBDIR=%{_lib} \
65         -DENABLE_COMMONCRYPTO=OFF \
66         %{!?with_gnutls:-DENABLE_GNUTLS=OFF} \
67         %{?with_gnutls:-DENABLE_OPENSSL=OFF}
68
69 %{__make}
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73
74 %{__make} -C build install \
75         DESTDIR=$RPM_BUILD_ROOT
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %post   -p /sbin/ldconfig
81 %postun -p /sbin/ldconfig
82
83 %files
84 %defattr(644,root,root,755)
85 %doc AUTHORS LICENSE NEWS.md README.md THANKS
86 %attr(755,root,root) %{_bindir}/zipcmp
87 %attr(755,root,root) %{_bindir}/zipmerge
88 %attr(755,root,root) %{_bindir}/ziptool
89 %attr(755,root,root) %{_libdir}/libzip.so.*.*
90 %attr(755,root,root) %ghost %{_libdir}/libzip.so.5
91 %{_mandir}/man1/zipcmp.1*
92 %{_mandir}/man1/zipmerge.1*
93 %{_mandir}/man1/ziptool.1*
94
95 %files devel
96 %defattr(644,root,root,755)
97 %doc API-CHANGES.md TODO.md
98 %attr(755,root,root) %{_libdir}/libzip.so
99 %{_includedir}/zip.h
100 %{_includedir}/zipconf.h
101 %{_pkgconfigdir}/libzip.pc
102 %{_mandir}/man3/ZIP_SOURCE_GET_ARGS.3*
103 %{_mandir}/man3/libzip.3*
104 %{_mandir}/man3/zip_*.3*
This page took 0.06299 seconds and 2 git commands to generate.