Accepting request 971109 from home:michals

- Allow for migration to 15.2 from earlier releases
- Fix build on SLE12

OBS-URL: https://build.opensuse.org/request/show/971109
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libvpd?expand=0&rev=5
This commit is contained in:
2022-04-20 12:22:47 +00:00
committed by Git OBS Bridge
parent dbf0e46491
commit cf72356c6a
2 changed files with 26 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Apr 20 11:53:57 UTC 2022 - Michal Suchanek <msuchanek@suse.com>
- Allow for migration to 15.2 from earlier releases
- Fix build on SLE12
-------------------------------------------------------------------
Tue Apr 19 16:06:53 UTC 2022 - Michal Suchanek <msuchanek@suse.com>

View File

@@ -17,6 +17,11 @@
%define soversion -2_2-3
# 15.2 is no longer updated but is supported migration target
# versions before 15.2 cannot have a package that obsoletes libvpd2
# to be able to migrate to 15.2 which has lsvpd that requires libvpd2
# let libvpd2 provide the udev rules instead
%define basepackage ( 0%{?sle_version} && 0%{?sle_version} <= 150200 )
Name: libvpd
Version: 2.2.9
@@ -44,7 +49,11 @@ Product Data (VPD) database created by vpdupdate in the lsvpd package.
%package -n %{name}%{soversion}
Summary: VPD Database access library for lsvpd
Group: System/Libraries
%if %basepackage
Requires: %{name}-base
%else
Requires: libvpd2
%endif
%description -n %{name}%{soversion}
The libvpd package contains classes that are used to access a Vital
@@ -75,14 +84,22 @@ the lsvpd package.
%autosetup -p1
%build
%if 0%{?sle_version} && 0%{?sle_version} < 150000
CFLAGS="%optflags -std=gnu99"
export CFLAGS
%endif
autoreconf -fiv
%configure \
--disable-static
%make_build
make %{?_smp_mflags}
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%if ! %basepackage
rm %{buildroot}%{_udevrulesdir}/90-vpdupdate.rules
rmdir -p --ignore-fail-on-non-empty %{buildroot}%{_udevrulesdir}
%endif
%post -n %{name}%{soversion} -p /sbin/ldconfig
%postun -n %{name}%{soversion} -p /sbin/ldconfig
@@ -90,8 +107,10 @@ find %{buildroot} -type f -name "*.la" -delete -print
%files -n %{name}%{soversion}
%{_libdir}/*.so.*
%if %basepackage
%files base
%{_udevrulesdir}/90-vpdupdate.rules
%endif
%files devel
%license COPYING