]> git.pld-linux.org Git - packages/libzip.git/blob - libzip.spec
5a25799acbe82ba7938d7c572fea4f10599dc4cf
[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.7.3
9 Release:        2
10 License:        BSD
11 Group:          Libraries
12 Source0:        https://libzip.org/download/%{name}-%{version}.tar.xz
13 # Source0-md5:  c0185e10023963bbec0e0002ab39d981
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 >= 3.0}
20 %{!?with_gnutls:BuildRequires:  openssl-devel}
21 BuildRequires:  rpmbuild(macros) >= 1.605
22 BuildRequires:  tar >= 1:1.22
23 BuildRequires:  xz
24 BuildRequires:  xz-devel >= 1:5.2
25 BuildRequires:  zlib-devel >= 1.1.2
26 Requires:       zlib >= 1.1.2
27 Requires:       xz-libs >= 1:5.2
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
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.
41
42 %package devel
43 Summary:        Header files for libzip library
44 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libzip
45 Group:          Development/Libraries
46 Requires:       %{name} = %{version}-%{release}
47 Requires:       bzip2-devel
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
52 Requires:       zlib-devel >= 1.1.2
53 Obsoletes:      libzip-static < 1.4.0
54
55 %description devel
56 Header files for libzip library.
57
58 %description devel -l pl.UTF-8
59 Pliki nagłówkowe biblioteki libzip.
60
61 %prep
62 %setup -q
63
64 %build
65 install -d build
66 cd build
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
76 %{__make}
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 %{__make} -C build install \
82         DESTDIR=$RPM_BUILD_ROOT
83
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)
92 %doc AUTHORS LICENSE NEWS.md README.md THANKS
93 %attr(755,root,root) %{_bindir}/zipcmp
94 %attr(755,root,root) %{_bindir}/zipmerge
95 %attr(755,root,root) %{_bindir}/ziptool
96 %attr(755,root,root) %{_libdir}/libzip.so.*.*
97 %attr(755,root,root) %ghost %{_libdir}/libzip.so.5
98 %{_mandir}/man1/zipcmp.1*
99 %{_mandir}/man1/zipmerge.1*
100 %{_mandir}/man1/ziptool.1*
101
102 %files devel
103 %defattr(644,root,root,755)
104 %doc API-CHANGES.md TODO.md
105 %attr(755,root,root) %{_libdir}/libzip.so
106 %{_includedir}/zip.h
107 %{_includedir}/zipconf.h
108 %{_libdir}/cmake/libzip
109 %{_pkgconfigdir}/libzip.pc
110 %{_mandir}/man3/ZIP_SOURCE_GET_ARGS.3*
111 %{_mandir}/man3/libzip.3*
112 %{_mandir}/man3/zip_*.3*
This page took 0.060138 seconds and 2 git commands to generate.