From 3fe8a728168cf57a2fad3fd5ad8a0087d24b8c23 Mon Sep 17 00:00:00 2001 From: baizg1107 Date: Tue, 26 Apr 2022 14:14:03 +0800 Subject: [PATCH] add old so for loongarch --- libsepol.spec | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/libsepol.spec b/libsepol.spec index 558a38a..47f03be 100644 --- a/libsepol.spec +++ b/libsepol.spec @@ -1,12 +1,29 @@ +%ifarch loongarch64 +%global bump_soname 1 +%else +%global bump_soname 0 +%endif +%global sover 2 + +%if 0%{?bump_soname} +%global old_sover %(echo $((%{sover}-1))) +%endif + Name: libsepol Version: 3.3 -Release: 2 +Release: 3 Summary: SELinux binary policy manipulation library License: LGPLv2+ URL: https://github.com/SELinuxProject/selinux/wiki/Releases Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/%{name}-%{version}.tar.gz - -BuildRequires: gcc flex +%if 0%{?bump_soname} +Provides: libsepol.so.1()(64bit) +Provides: libsepol.so.1(LIBSEPOL_1.0)(64bit) +Provides: libsepol.so.1(LIBSEPOL_1.1)(64bit) +Provides: libsepol.so.1(LIBSEPOL_3.0)(64bit) +BuildRequires: libsepol +%endif +BuildRequires: gcc flex %description libsepol provides an API for the manipulation of SELinux binary @@ -36,6 +53,10 @@ make %{?_smp_mflags} CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" rm -rf %{buildroot} make DESTDIR="%{buildroot}" LIBDIR="%{_libdir}" SHLIBDIR="%{_libdir}" install +%if 0%{?bump_soname} +cp %{buildroot}/%{_libdir}/%{name}.so.%{sover} %{buildroot}/%{_libdir}/%{name}.so.%{old_sover} +%endif + %pre %preun @@ -64,6 +85,9 @@ make DESTDIR="%{buildroot}" LIBDIR="%{_libdir}" SHLIBDIR="%{_libdir}" install %{_mandir}/man3/* %changelog +* Mon Apr 25 2022 baizhonggui - 3.3-3 +- Add old version so file in openEuler:22.03:LTS:LoongArch + * Tue Mar 15 2022 panxiaohe - 3.3-2 - delete useless old version dynamic library -- Gitee