summaryrefslogtreecommitdiffstats
path: root/libzip.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-06-28 17:10:16 +0200
committerRemi Collet <remi@php.net>2022-06-28 17:10:16 +0200
commit36086f11e6f3016160e14fbc7cfe0ce761a2cedd (patch)
tree850cf0e14c169637c8ae9debd288778ef3e1f485 /libzip.spec
parent8e4727f822e242533e7fdbcff30fa4b7c8b45e17 (diff)
update to 1.9.1
also build as remi-libzip for EL-7 and EL-8
Diffstat (limited to 'libzip.spec')
-rw-r--r--libzip.spec110
1 files changed, 60 insertions, 50 deletions
diff --git a/libzip.spec b/libzip.spec
index f32b5cc..1eb6453 100644
--- a/libzip.spec
+++ b/libzip.spec
@@ -1,4 +1,4 @@
-# remirepo spec file for libzip5
+# remirepo spec file for libzip and remi-libzip
# renamed for parallel installation, from:
#
# Fedora spec file for libzip
@@ -8,27 +8,30 @@
#
# Please preserve changelog entries
#
+
+## FOR EL-8
+## 1st build --with move_to_opt for SCL
+## 2nd build --without move_to_opt for module
+
%global libname libzip
%global soname 5
%bcond_without tests
-%{?scl: %scl_package libzip}
+%if 0%{?vendeur:1} && 0%{?rhel} >= 7
+%bcond_without move_to_opt
+%else
+%bcond_with move_to_opt
+%endif
-%if 0%{?rhel} >= 9
-%global move_to_opt 1
+%if %{with move_to_opt}
%global _prefix /opt/%{?vendeur:%{vendeur}/}%{libname}
%global __arch_install_post /bin/true
-Name: %{?vendeur:%{vendeur}-}%{libname}
-%else
-%global move_to_opt 0
-%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8
-Name: %{?scl_prefix}%{libname}
+Name: %{?vendeur:%{vendeur}-}%{libname}
%else
-Name: %{libname}%{soname}
-%endif
+Name: %{libname}
%endif
-Version: 1.9.1
+Version: 1.9.2
Release: 1%{?dist}
Summary: C library for reading, creating, and modifying zip archives
@@ -36,8 +39,6 @@ License: BSD
URL: https://libzip.org/
Source0: https://libzip.org/download/libzip-%{version}.tar.xz
-Patch0: libzip-upstream.patch
-
BuildRequires: gcc
BuildRequires: zlib-devel >= 1.1.2
BuildRequires: bzip2-devel
@@ -65,25 +66,25 @@ BuildRequires: perl(Symbol)
BuildRequires: perl(UNIVERSAL)
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
-%if 0%{?!scl:1}
-%if "%{name}" == "%{libname}"
-Obsoletes: %{libname}%{soname} <= %{version}
-%if 0%{?rhel}
-# RHEL have commands in main package
-Provides: %{libname} = %{version}-%{release}
-%endif
+
+%if %{with move_to_opt}
+%if 0%{?rhel} == 7
+Obsoletes: libzip5 < %{version}
%endif
+%if 0%{?rhel} == 8
+Obsoletes: php72-libzip < %{version}
+Obsoletes: php73-libzip < %{version}
+Obsoletes: php74-libzip < %{version}
+Obsoletes: php80-libzip < %{version}
+Obsoletes: php81-libzip < %{version}
+Obsoletes: php82-libzip < %{version}
%endif
-%if %{move_to_opt}
# Filter in the /opt installation
%{?filter_from_provides: %filter_from_provides /libzip/d}
%{?filter_from_requires: %filter_from_requires /libzip/d}
%{?filter_setup}
-%endif
-%if 0%{?rhel} >= 8 && 0%{?scl:1}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
%global __provides_exclude ^(libzip\\.so|cmake|pkgconfig).*$
%global __requires_exclude ^libzip\\.so.*$
%endif
@@ -102,14 +103,18 @@ The API is documented by man pages.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
-%if 0%{?!scl:1}
-%if "%{name}" != "%{libname}"
-Conflicts: %{libname}-last-devel < %{version}
-Conflicts: %{libname}-devel < %{version}
-Provides: %{libname}-devel = %{version}-%{release}
-%else
-Obsoletes: %{libname}-last-devel <= %{version}
-Obsoletes: %{libname}%{soname}-devel <= %{version}
+
+%if %{with move_to_opt}
+%if 0%{?rhel} == 7
+Obsoletes: libzip5-devel < %{version}
+%endif
+%if 0%{?rhel} == 8
+Obsoletes: php72-libzip-devel < %{version}
+Obsoletes: php73-libzip-devel < %{version}
+Obsoletes: php74-libzip-devel < %{version}
+Obsoletes: php80-libzip-devel < %{version}
+Obsoletes: php81-libzip-devel < %{version}
+Obsoletes: php82-libzip-devel < %{version}
%endif
%endif
@@ -121,17 +126,18 @@ developing applications that use %{name}.
%package tools
Summary: Command line tools from %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
-%if 0%{?!scl:1}
-%if "%{name}" != "%{libname}"
-Conflicts: %{libname}-last-tools < %{version}
-# Fedora 23 have sub package
-Conflicts: %{libname}-tools < %{version}
-Provides: %{libname}-tools = %{version}-%{release}
-# RHEL have commands in main package
-Conflicts: %{libname} < 1.1
-%else
-Obsoletes: %{libname}-last-tools <= %{version}
-Obsoletes: %{libname}%{soname}-tools <= %{version}
+
+%if %{with move_to_opt}
+%if 0%{?rhel} == 7
+Obsoletes: libzip5-tools < %{version}
+%endif
+%if 0%{?rhel} == 8
+Obsoletes: php72-libzip-tools < %{version}
+Obsoletes: php73-libzip-tools < %{version}
+Obsoletes: php74-libzip-tools < %{version}
+Obsoletes: php80-libzip-tools < %{version}
+Obsoletes: php81-libzip-tools < %{version}
+Obsoletes: php82-libzip-tools < %{version}
%endif
%endif
@@ -144,7 +150,7 @@ The %{name}-tools package provides command line tools split off %{name}:
%prep
%setup -q -n %{libname}-%{version}
-%patch0 -p1
+: ========== BUILD in %{_prefix} ==========
# unwanted in package documentation
rm INSTALL.md
@@ -214,16 +220,16 @@ make check
%files
-%{!?_licensedir:%global license %%doc}
%license LICENSE
%{_libdir}/libzip.so.%{soname}*
-%if %{move_to_opt}
+%if %{with move_to_opt}
%dir %{_prefix}
%dir %{_mandir}
%dir %{_libdir}
%dir %{_libdir}
%dir %{_datadir}
-%dir %{_licensedir}
+%ghost %{_datadir}/doc
+%ghost %{_datadir}/licenses
%endif
%files tools
@@ -231,7 +237,7 @@ make check
%{_bindir}/zipmerge
%{_bindir}/ziptool
%{_mandir}/man1/zip*
-%if %{move_to_opt}
+%if %{with move_to_opt}
%dir %{_bindir}
%dir %{_mandir}/man1
%endif
@@ -246,7 +252,7 @@ make check
%{_mandir}/man3/libzip*
%{_mandir}/man3/zip*
%{_mandir}/man3/ZIP*
-%if %{move_to_opt}
+%if %{with move_to_opt}
%dir %{_includedir}
%dir %{_mandir}/man3
%dir %{_libdir}/pkgconfig
@@ -255,6 +261,10 @@ make check
%changelog
+* Tue Jun 28 2022 Remi Collet <remi@remirepo.net> - 1.9.2-1
+- update to 1.9.1
+- also build as remi-libzip for EL-7 and EL-8
+
* Tue Jun 28 2022 Remi Collet <remi@remirepo.net> - 1.9.1-1
- update to 1.9.1