From 7af69d0e975f27cd4141ebf2f365032ac17c5150 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 5 Apr 2019 09:53:53 +0200 Subject: - rename to oniguruma5 to allow parallel installation beside old oniguruma version --- .gitignore | 8 ++++++++ Makefile | 4 ++++ oniguruma.spec | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 62 insertions(+), 8 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fc9aa8c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +clog +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..91b0fd5 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../common/Makefile + diff --git a/oniguruma.spec b/oniguruma.spec index 130dc3c..82e042d 100644 --- a/oniguruma.spec +++ b/oniguruma.spec @@ -1,29 +1,63 @@ +# remirepo spec file for oniguruma5 +# renamed for parallel installation, from: +# +# Fedora spec file for oniguruma +# +# License: MIT +# http://opensource.org/licenses/MIT +# +# Please preserve changelog entries +# +%global libname oniguruma +%global soname 5 %undefine _changelog_trimtime -Name: oniguruma +# Fedora 29 have 6.9, soname 5 +# Fedora 28 have 6.8, soname 5 +# Fedora 27 have 6.6, soname 4 +# EPEL-7 have 5.9, soname 2 +# RHEL-6 have 5.9, soname 2 + +%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8 +Name: %{libname} +%else +Name: %{libname}%{soname} +%endif Version: 6.9.1 Release: 1%{?dist} Summary: Regular expressions library -Group: System Environment/Libraries License: BSD URL: https://github.com/kkos/oniguruma/ Source0: https://github.com/kkos/oniguruma/releases/download/v%{version}/onig-%{version}.tar.gz BuildRequires: gcc +%if "%{name}" == "%{libname}" +Obsoletes: %{libname}%{soname} <= %{version} +%endif + %description Oniguruma is a regular expressions library. The characteristics of this library is that different character encoding for every regular expression object can be specified. (supported APIs: GNU regex, POSIX and Oniguruma native) +%if "%{name}" != "%{libname}" +%{name} is designed to be installed beside %{libname}. +%endif %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name}%{?isa} = %{version}-%{release} +%if "%{name}" == "%{libname}" +Obsoletes: %{libname}%{soname}-devel <= %{version} +%else +Conflicts: %{libname}-devel < %{version} +Provides: %{libname}-devel = %{version}-%{release} +%endif + %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. @@ -46,6 +80,7 @@ for f in \ done %endif + %build %configure \ --disable-silent-rules \ @@ -61,17 +96,20 @@ done find $RPM_BUILD_ROOT -name '*.la' \ -exec %{__rm} -f {} ';' + %check %{__make} check -%post -p /sbin/ldconfig +%if 0%{?fedora} < 28 && 0%{?rhel} < 8 +%post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%endif %files -%defattr(-,root,root,-) %doc AUTHORS +%{!?_licensedir:%global license %%doc} %license COPYING %doc HISTORY %doc README.md @@ -79,10 +117,9 @@ find $RPM_BUILD_ROOT -name '*.la' \ %lang(ja) %doc README_japanese %lang(ja) %doc index_ja.html -%{_libdir}/libonig.so.5* +%{_libdir}/libonig.so.%{soname}* %files devel -%defattr(-,root,root,-) %doc doc/API %doc doc/CALLOUTS.API %doc doc/CALLOUTS.BUILTIN @@ -98,9 +135,14 @@ find $RPM_BUILD_ROOT -name '*.la' \ %{_libdir}/libonig.so %{_includedir}/onig*.h -%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/pkgconfig/%{libname}.pc + %changelog +* Mon Apr 1 2019 Remi Collet -6.9.1-1 +- rename to oniguruma5 to allow parallel installation + beside old oniguruma version + * Wed Dec 12 2018 Mamoru TASAKA - 6.9.1-1 - 6.9.1 -- cgit