diff --git a/jsoncpp.spec b/jsoncpp.spec index d4323214d392dacff0507de4b5b111354020bde2..211a4a4ab65985888f1ca65ada9ce322c0628aa8 100644 --- a/jsoncpp.spec +++ b/jsoncpp.spec @@ -1,12 +1,26 @@ +%ifarch loongarch64 +%global bump_soname 1 +%else +%global bump_soname 0 +%endif + +%global sover 25 +%if 0%{?bump_soname} +%global old_sover %(echo $((%{sover}-1))) +%endif + Name: jsoncpp Version: 1.9.5 -Release: 3 +Release: 4 Summary: JSON C++ library License: Public Domain or MIT URL: https://github.com/open-source-parsers/jsoncpp Source0: https://github.com/open-source-parsers/jsoncpp/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc-c++ cmake >= 3.1 python3-devel - +%if 0%{?bump_soname} +Provides: libjsoncpp.so.%{old_sover}()(64bit) +BuildRequires: jsoncpp +%endif %description JsonCpp is a C++ library that allows manipulating JSON values, including serialization and deserialization to and from strings. @@ -62,7 +76,9 @@ touch %{buildroot}%{_docdir}/%{name}/html hardlink -cfv %{buildroot}%{_docdir}/%{name} # When the .so file name changes during version upgrade, you need to copy the lower version of .so file -# cp -a %{_libdir}/libjsoncpp.so.* $RPM_BUILD_ROOT%{_libdir} +%if 0%{?bump_soname} +cp %{buildroot}/%{_libdir}/libjsoncpp.so.%{sover} %{buildroot}/%{_libdir}/libjsoncpp.so.%{old_sover} +%endif %check %make_build -C %{_vpath_builddir} jsoncpp_check @@ -91,6 +107,9 @@ hardlink -cfv %{buildroot}%{_docdir}/%{name} %changelog +* Thu Apr 28 2022 baizhonggui - 1.9.5-4 +- Add old version so file in openEuler:22.03:LTS:LoongArch + * Mon Jan 10 2022 shixuantong - 1.9.5-3 - Delete so files of lower versions