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

Last change on this file since 1750 was 1741, checked in by tellie, 5 years ago

spec: libzip: Release version 1.7.3-1.

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