source: spec/trunk/SPECS/libzip.spec@ 1836

Last change on this file since 1836 was 1836, checked in by tellie, 2 years ago

spec: libzip: Release version 1.10.1-1.

File size: 4.7 KB
Line 
1%if !0%{?os2_version}
2%bcond_without tests
3%else
4%bcond_with tests
5%endif
6
7Name: libzip
8Version: 1.10.1
9Release: 1%{?dist}
10Summary: C library for reading, creating, and modifying zip archives
11
12License: BSD
13URL: https://libzip.org/
14%if !0%{?os2_version}
15Source0: https://libzip.org/download/libzip-%{version}.tar.xz
16%else
17%scm_source github https://github.com/TeLLie/%{name}-os2 %{version}-os2
18%endif
19
20
21BuildRequires: gcc
22BuildRequires: zlib-devel
23BuildRequires: bzip2-devel
24BuildRequires: openssl-devel
25BuildRequires: xz-devel
26%if !0%{?os2_version}
27BuildRequires: libzstd-devel >= 1.3.6
28%endif
29BuildRequires: 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}
34BuildRequires: perl-interpreter
35%endif
36BuildRequires: perl(Cwd)
37BuildRequires: perl(File::Copy)
38BuildRequires: perl(File::Path)
39BuildRequires: perl(Getopt::Long)
40BuildRequires: perl(IPC::Open3)
41BuildRequires: perl(Storable)
42BuildRequires: perl(Symbol)
43BuildRequires: perl(UNIVERSAL)
44BuildRequires: perl(strict)
45BuildRequires: perl(warnings)
46
47
48%description
49libzip is a C library for reading, creating, and modifying zip archives. Files
50can be added from data buffers, files, or compressed data copied directly from
51other zip archives. Changes made without closing the archive can be reverted.
52The API is documented by man pages.
53
54
55%package devel
56Summary: Development files for %{name}
57Requires: %{name}%{?_isa} = %{version}-%{release}
58
59%description devel
60The %{name}-devel package contains libraries and header files for
61developing applications that use %{name}.
62
63
64%package tools
65Summary: Command line tools from %{name}
66Requires: %{name}%{?_isa} = %{version}-%{release}
67
68%description tools
69The %{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
83rm INSTALL.md
84
85# drop skipped test which make test suite fails (cmake issue ?)
86sed -e '/clone-fs-/d' \
87 -i regress/CMakeLists.txt
88
89
90%build
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
105
106%cmake_build
107%else
108mkdir builder
109cd builder
110export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
111export LIBS="-lcx"
112
113%cmake .. \
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 \
121 -DENABLE_ZSTD:BOOL=OFF \
122 -DBUILD_TOOLS:BOOL=ON \
123 -DBUILD_REGRESS:BOOL=ON \
124 -DBUILD_EXAMPLES:BOOL=OFF \
125 -DBUILD_DOC:BOOL=ON
126
127make %{?_smp_mflags}
128%endif
129
130%install
131%if !0%{?os2_version}
132%cmake_install
133%else
134%make_install INSTALL_ROOT=%{buildroot} -C builder
135%endif
136
137%check
138%if %{with tests}
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
162%{_mandir}/man1/zip*
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
177
178%{_libdir}/pkgconfig/libzip.pc
179%{_libdir}/cmake/libzip
180%{_mandir}/man3/libzip*
181%{_mandir}/man3/zip*
182%{_mandir}/man3/ZIP*
183
184%changelog
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
191* Sun Jan 15 2023 Elbert Pol <elbert.pol@gmail.com> - 1.9.2 - 1
192- Updated to latest version
193
194* Sun Jun 19 2022 Elbert Pol <elbert.pol@gmail.com> - 1.9.0 - 1
195- Updated to latest version
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
Note: See TracBrowser for help on using the repository browser.