| 1 | %bcond_without tests
|
|---|
| 2 |
|
|---|
| 3 | Name: libzip
|
|---|
| 4 | Version: 1.8.0
|
|---|
| 5 | Release: 1%{?dist}
|
|---|
| 6 | Summary: C library for reading, creating, and modifying zip archives
|
|---|
| 7 |
|
|---|
| 8 | License: BSD
|
|---|
| 9 | URL: https://libzip.org/
|
|---|
| 10 | %if !0%{?os2_version}
|
|---|
| 11 | Source0: https://libzip.org/download/libzip-%{version}.tar.xz
|
|---|
| 12 | %else
|
|---|
| 13 | %scm_source github https://github.com/TeLLie/%{name}-os2 %{version}-os2
|
|---|
| 14 | %endif
|
|---|
| 15 |
|
|---|
| 16 | BuildRequires: gcc
|
|---|
| 17 | BuildRequires: zlib-devel
|
|---|
| 18 | BuildRequires: bzip2-devel
|
|---|
| 19 | BuildRequires: openssl-devel
|
|---|
| 20 | BuildRequires: xz-devel
|
|---|
| 21 | %if !0%{?os2_version}
|
|---|
| 22 | BuildRequires: libzstd-devel
|
|---|
| 23 | %endif
|
|---|
| 24 | BuildRequires: cmake >= 3.0.2
|
|---|
| 25 | # Needed to run the test suite
|
|---|
| 26 | # find regress/ -type f | /usr/lib/rpm/perl.req
|
|---|
| 27 | # find regress/ -type f | /usr/lib/rpm/perl.prov
|
|---|
| 28 | %if !0%{?os2_version}
|
|---|
| 29 | BuildRequires: perl-interpreter
|
|---|
| 30 | %endif
|
|---|
| 31 | BuildRequires: perl(Cwd)
|
|---|
| 32 | BuildRequires: perl(File::Copy)
|
|---|
| 33 | BuildRequires: perl(File::Path)
|
|---|
| 34 | BuildRequires: perl(Getopt::Long)
|
|---|
| 35 | BuildRequires: perl(IPC::Open3)
|
|---|
| 36 | BuildRequires: perl(Storable)
|
|---|
| 37 | BuildRequires: perl(Symbol)
|
|---|
| 38 | BuildRequires: perl(UNIVERSAL)
|
|---|
| 39 | BuildRequires: perl(strict)
|
|---|
| 40 | BuildRequires: perl(warnings)
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 | %description
|
|---|
| 44 | libzip is a C library for reading, creating, and modifying zip archives. Files
|
|---|
| 45 | can be added from data buffers, files, or compressed data copied directly from
|
|---|
| 46 | other zip archives. Changes made without closing the archive can be reverted.
|
|---|
| 47 | The API is documented by man pages.
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 | %package devel
|
|---|
| 51 | Summary: Development files for %{name}
|
|---|
| 52 | Requires: %{name}%{?_isa} = %{version}-%{release}
|
|---|
| 53 |
|
|---|
| 54 | %description devel
|
|---|
| 55 | The %{name}-devel package contains libraries and header files for
|
|---|
| 56 | developing applications that use %{name}.
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 | %package tools
|
|---|
| 60 | Summary: Command line tools from %{name}
|
|---|
| 61 | Requires: %{name}%{?_isa} = %{version}-%{release}
|
|---|
| 62 |
|
|---|
| 63 | %description tools
|
|---|
| 64 | The %{name}-tools package provides command line tools split off %{name}:
|
|---|
| 65 | - zipcmp
|
|---|
| 66 | - zipmerge
|
|---|
| 67 | - ziptool
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 | %prep
|
|---|
| 71 | %if !0%{?os2_version}
|
|---|
| 72 | %autosetup -p1
|
|---|
| 73 | %else
|
|---|
| 74 | %scm_setup
|
|---|
| 75 | %endif
|
|---|
| 76 |
|
|---|
| 77 | # unwanted in package documentation
|
|---|
| 78 | rm INSTALL.md
|
|---|
| 79 |
|
|---|
| 80 | # drop skipped test which make test suite fails (cmake issue ?)
|
|---|
| 81 | sed -e '/clone-fs-/d' \
|
|---|
| 82 | -i regress/CMakeLists.txt
|
|---|
| 83 |
|
|---|
| 84 | %build
|
|---|
| 85 | mkdir builder
|
|---|
| 86 | cd builder
|
|---|
| 87 |
|
|---|
| 88 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 89 | export LIBS="-lcx"
|
|---|
| 90 |
|
|---|
| 91 | %cmake .. \
|
|---|
| 92 | -DENABLE_COMMONCRYPTO:BOOL=ON \
|
|---|
| 93 | -DENABLE_GNUTLS:BOOL=OFF \
|
|---|
| 94 | -DENABLE_MBEDTLS:BOOL=OFF \
|
|---|
| 95 | -DENABLE_OPENSSL:BOOL=ON \
|
|---|
| 96 | -DENABLE_WINDOWS_CRYPTO:BOOL=OFF \
|
|---|
| 97 | -DENABLE_BZIP2:BOOL=ON \
|
|---|
| 98 | -DENABLE_LZMA:BOOL=ON \
|
|---|
| 99 | -DENABLE_ZSTD:BOOL=OFF \
|
|---|
| 100 | -DBUILD_TOOLS:BOOL=ON \
|
|---|
| 101 | -DBUILD_REGRESS:BOOL=ON \
|
|---|
| 102 | -DBUILD_EXAMPLES:BOOL=OFF \
|
|---|
| 103 | -DBUILD_DOC:BOOL=ON
|
|---|
| 104 |
|
|---|
| 105 | %if !0%{?os2_version}
|
|---|
| 106 | %cmake_build
|
|---|
| 107 | %else
|
|---|
| 108 | make %{?_smp_mflags}
|
|---|
| 109 | %endif
|
|---|
| 110 |
|
|---|
| 111 | %install
|
|---|
| 112 | %if !0%{?os2_version}
|
|---|
| 113 | %cmake_install
|
|---|
| 114 | %else
|
|---|
| 115 | %make_install -C builder
|
|---|
| 116 | mkdir -p %{buildroot}%{_mandir}/man1
|
|---|
| 117 | mkdir -p %{buildroot}%{_mandir}/man3
|
|---|
| 118 | cp -p builder/man/zip*.1 %{buildroot}%{_mandir}/man1/
|
|---|
| 119 | cp -p builder/man/zip*.3 %{buildroot}%{_mandir}/man3/
|
|---|
| 120 | %endif
|
|---|
| 121 |
|
|---|
| 122 | %check
|
|---|
| 123 | %if !0%{?os2_version}
|
|---|
| 124 | %ctest
|
|---|
| 125 | %else
|
|---|
| 126 | : Test suite disabled
|
|---|
| 127 | %endif
|
|---|
| 128 |
|
|---|
| 129 | %if !0%{?os2_version}
|
|---|
| 130 | %ldconfig_scriptlets
|
|---|
| 131 | %endif
|
|---|
| 132 |
|
|---|
| 133 | %files
|
|---|
| 134 | %license LICENSE
|
|---|
| 135 | %if !0%{?os2_version}
|
|---|
| 136 | %{_libdir}/libzip.so.5*
|
|---|
| 137 | %else
|
|---|
| 138 | %{_libdir}/*.dll
|
|---|
| 139 | %endif
|
|---|
| 140 |
|
|---|
| 141 | %files tools
|
|---|
| 142 | %if !0%{?os2_version}
|
|---|
| 143 | %{_bindir}/zipcmp
|
|---|
| 144 | %{_bindir}/zipmerge
|
|---|
| 145 | %{_bindir}/ziptool
|
|---|
| 146 | %else
|
|---|
| 147 | %{_bindir}/zipcmp.exe
|
|---|
| 148 | %{_bindir}/zipmerge.exe
|
|---|
| 149 | %{_bindir}/ziptool.exe
|
|---|
| 150 | %endif
|
|---|
| 151 | %{_mandir}/man1/zip*
|
|---|
| 152 |
|
|---|
| 153 | %files devel
|
|---|
| 154 | %doc AUTHORS THANKS *.md
|
|---|
| 155 | %{_includedir}/zip.h
|
|---|
| 156 | %{_includedir}/zipconf*.h
|
|---|
| 157 | %if !0%{?os2_version}
|
|---|
| 158 | %{_libdir}/libzip.so
|
|---|
| 159 | %else
|
|---|
| 160 | %{_libdir}/*.a
|
|---|
| 161 | %endif
|
|---|
| 162 | %{_libdir}/pkgconfig/libzip.pc
|
|---|
| 163 | %{_libdir}/cmake/libzip
|
|---|
| 164 | %{_mandir}/man3/libzip*
|
|---|
| 165 | %{_mandir}/man3/zip*
|
|---|
| 166 | %{_mandir}/man3/ZIP*
|
|---|
| 167 |
|
|---|
| 168 |
|
|---|
| 169 | %changelog
|
|---|
| 170 | * Sun Jul 04 2021 Elbert Pol <elbert.pol@gmail.com> - 1.8.0 - 1
|
|---|
| 171 | - Update to latest version
|
|---|
| 172 |
|
|---|
| 173 | * Wed Jan 06 2021 Elbert Pol <elbert.pol@gmail.com> - 1.22 - 1
|
|---|
| 174 | - Update to latest version
|
|---|
| 175 | - Finetuning the spec file
|
|---|
| 176 |
|
|---|
| 177 | * Thu Jan 31 2019 Elbert Pol <elbert.pol@gmail.com> - 1.21-2
|
|---|
| 178 | - Upload src to github
|
|---|
| 179 |
|
|---|
| 180 | * Sat Jan 12 2019 Elbert Pol <elbert.pol@gmail.com> 1.21-1
|
|---|
| 181 | - Updated to latest source
|
|---|
| 182 |
|
|---|
| 183 | * Sun Sep 09 2018 Elbert Pol <elbert.pol@gmail.com> 1.20-2
|
|---|
| 184 | - Some changes for Spec file
|
|---|
| 185 |
|
|---|
| 186 | * Sun Sep 09 2018 Elbert Pol <elbert.pol@gmail.com> 1.20-1
|
|---|
| 187 | - First OS/2 rpm release
|
|---|