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