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

Last change on this file since 1813 was 1813, checked in by tellie, 3 years ago

spec: libzip: Release version 1.9.0-1.

File size: 4.4 KB
Line 
1%bcond_without tests
2
3Name: libzip
4Version: 1.9.0
5Release: 1%{?dist}
6Summary: C library for reading, creating, and modifying zip archives
7
8License: BSD
9URL: https://libzip.org/
10%if !0%{?os2_version}
11Source0: 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
16BuildRequires: gcc
17BuildRequires: zlib-devel
18BuildRequires: bzip2-devel
19BuildRequires: openssl-devel
20BuildRequires: xz-devel
21%if !0%{?os2_version}
22BuildRequires: libzstd-devel >= 1.3.6
23%endif
24BuildRequires: 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}
29BuildRequires: perl-interpreter
30%endif
31BuildRequires: perl(Cwd)
32BuildRequires: perl(File::Copy)
33BuildRequires: perl(File::Path)
34BuildRequires: perl(Getopt::Long)
35BuildRequires: perl(IPC::Open3)
36BuildRequires: perl(Storable)
37BuildRequires: perl(Symbol)
38BuildRequires: perl(UNIVERSAL)
39BuildRequires: perl(strict)
40BuildRequires: perl(warnings)
41
42
43%description
44libzip is a C library for reading, creating, and modifying zip archives. Files
45can be added from data buffers, files, or compressed data copied directly from
46other zip archives. Changes made without closing the archive can be reverted.
47The API is documented by man pages.
48
49
50%package devel
51Summary: Development files for %{name}
52Requires: %{name}%{?_isa} = %{version}-%{release}
53
54%description devel
55The %{name}-devel package contains libraries and header files for
56developing applications that use %{name}.
57
58
59%package tools
60Summary: Command line tools from %{name}
61Requires: %{name}%{?_isa} = %{version}-%{release}
62
63%description tools
64The %{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
78rm INSTALL.md
79
80# drop skipped test which make test suite fails (cmake issue ?)
81sed -e '/clone-fs-/d' \
82 -i regress/CMakeLists.txt
83
84
85%build
86%if !0%{?os2_version}
87%cmake \
88 -DENABLE_COMMONCRYPTO:BOOL=OFF \
89 -DENABLE_GNUTLS:BOOL=OFF \
90 -DENABLE_MBEDTLS:BOOL=OFF \
91 -DENABLE_OPENSSL:BOOL=ON \
92 -DENABLE_WINDOWS_CRYPTO:BOOL=OFF \
93 -DENABLE_BZIP2:BOOL=ON \
94 -DENABLE_LZMA:BOOL=ON \
95 -DENABLE_ZSTD:BOOL=ON \
96 -DBUILD_TOOLS:BOOL=ON \
97 -DBUILD_REGRESS:BOOL=ON \
98 -DBUILD_EXAMPLES:BOOL=OFF \
99 -DBUILD_DOC:BOOL=ON
100%else
101mkdir builder
102cd builder
103export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
104export LIBS="-lcx"
105
106%cmake \
107 -DENABLE_COMMONCRYPTO:BOOL=ON \
108 -DENABLE_GNUTLS:BOOL=OFF \
109 -DENABLE_MBEDTLS:BOOL=OFF \
110 -DENABLE_OPENSSL:BOOL=ON \
111 -DENABLE_WINDOWS_CRYPTO:BOOL=OFF \
112 -DENABLE_BZIP2:BOOL=ON \
113 -DENABLE_LZMA:BOOL=ON \
114 -DENABLE_ZSTD:BOOL=OFF \
115 -DBUILD_TOOLS:BOOL=ON \
116 -DBUILD_REGRESS:BOOL=ON \
117 -DBUILD_EXAMPLES:BOOL=OFF \
118 -DBUILD_DOC:BOOL=ON ..
119%endif
120
121%if !0%{?os2_version}
122%cmake_build
123%else
124make %{?_smp_mflags}
125%endif
126
127%install
128%if !0%{?os2_version}
129%cmake_build
130%else
131%make_install INSTALL_ROOT=%{buildroot} -C builder
132%endif
133
134
135%check
136%if !0%{?os2_version}
137%if %{with tests}
138%ctest
139%else
140: Test suite disabled
141%endif
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%{_bindir}/zipcmp.exe
163%{_bindir}/zipmerge.exe
164%{_bindir}/ziptool.exe
165%endif
166%{_mandir}/man1/zip*
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%{_libdir}/pkgconfig/libzip.pc
178%{_libdir}/cmake/libzip
179%{_mandir}/man3/libzip*
180%{_mandir}/man3/zip*
181%{_mandir}/man3/ZIP*
182
183%changelog
184* Sun Jun 19 2022 Elbert Pol <elbert.pol@gmail.com> - 1.9.0 - 1
185- Updated to latest version
186
187* Sun Jul 04 2021 Elbert Pol <elbert.pol@gmail.com> - 1.8.0 - 1
188- Update to latest version
189
190* Wed Jan 06 2021 Elbert Pol <elbert.pol@gmail.com> - 1.22 - 1
191- Update to latest version
192- Finetuning the spec file
193
194* Thu Jan 31 2019 Elbert Pol <elbert.pol@gmail.com> - 1.21-2
195- Upload src to github
196
197* Sat Jan 12 2019 Elbert Pol <elbert.pol@gmail.com> 1.21-1
198- Updated to latest source
199
200* Sun Sep 09 2018 Elbert Pol <elbert.pol@gmail.com> 1.20-2
201- Some changes for Spec file
202
203* Sun Sep 09 2018 Elbert Pol <elbert.pol@gmail.com> 1.20-1
204- First OS/2 rpm release
Note: See TracBrowser for help on using the repository browser.