[rpm] Use make_build macro when it's available

This commit is contained in:
Slava Monich
2024-10-28 02:58:54 +02:00
parent 1e9c46a485
commit 04c803da45

View File

@@ -26,6 +26,9 @@ BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(rpm)
%define license_support %(pkg-config --exists 'rpm >= 4.11'; echo $?)
# make_build macro appeared in rpm 4.12
%{!?make_build:%define make_build make %{_smp_mflags}}
Requires: ofono >= %{ofono_version}
Requires: libofonobinderpluginext >= %{libofonobinderpluginext_version}
Requires: libgbinder >= %{libgbinder_version}
@@ -48,8 +51,8 @@ Binder plugin for Sailfish OS fork of ofono
%setup -q -n %{name}-%{version}
%build
make %{_smp_mflags} PLUGINDIR=%{plugin_dir} KEEP_SYMBOLS=1 release
make %{_smp_mflags} -C lib LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release pkgconfig
%make_build PLUGINDIR=%{plugin_dir} KEEP_SYMBOLS=1 release
%make_build -C lib LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release pkgconfig
%check
make test