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

Last change on this file since 1784 was 1781, checked in by tellie, 4 years ago

spec: libzip: Release version 1.8.0-1.

File size: 4.0 KB
Line 
1%bcond_without tests
2
3Name: libzip
4Version: 1.8.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
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%build
85mkdir builder
86cd builder
87
88export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
89export 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
108make %{?_smp_mflags}
109%endif
110
111%install
112%if !0%{?os2_version}
113%cmake_install
114%else
115%make_install -C builder
116mkdir -p %{buildroot}%{_mandir}/man1
117mkdir -p %{buildroot}%{_mandir}/man3
118cp -p builder/man/zip*.1 %{buildroot}%{_mandir}/man1/
119cp -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
Note: See TracBrowser for help on using the repository browser.