diff options
author | Eugene Syromyatnikov <evgsyr@gmail.com> | 2020-09-03 18:45:56 +0200 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2020-09-03 18:42:36 +0000 |
commit | 8a8d7e9bba5578283ccc60459b6c8f5646b8e443 (patch) | |
tree | 6fc7a114d3517a71d2398395945c8c9a40bce241 | |
parent | e441a5502d00a75d6f10c3f773d76bb4988963c9 (diff) | |
download | strace-8a8d7e9bba5578283ccc60459b6c8f5646b8e443.tar.gz |
strace.spec.in: use %make_build/%make_install macros
As suggested in [1][2].
[1] https://src.fedoraproject.org/fork/tstellar/rpms/strace/c/c7358b588cb5f2893dec3b7daa84e63d9389773a.patch
[2] https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* strace.spec.in [?!__make] (%__make): New definition.
[?!__install] (%__install): Likewise.
[?!make_build] (%make_build): Likewise.
[?!make_install] (%make_install): Likewise.
(%build, %check): Use %make_build.
(%install): Use %make_install.
Co-authored-by: Tom Stellard <tstellar@redhat.com>
-rw-r--r-- | strace.spec.in | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/strace.spec.in b/strace.spec.in index 2a358720d..14e2c8c70 100644 --- a/strace.spec.in +++ b/strace.spec.in @@ -39,6 +39,12 @@ BuildRequires: pkgconfig(bluez) %{?!buildroot:BuildRoot: %_tmppath/buildroot-%name-%version-%release} %define maybe_use_defattr %{?suse_version:%%defattr(-,root,root)} +# Fallback definitions for make_build/make_install macros +%{?!__make: %global __make %_bindir/make} +%{?!__install: %global __install %_bindir/install} +%{?!make_build: %global make_build %__make %{?_smp_mflags}} +%{?!make_install: %global make_install %__make install DESTDIR="%{?buildroot}" INSTALL="%__install -p"} + %description The strace program intercepts and records the system calls called and received by a running process. Strace can print a record of each @@ -69,10 +75,10 @@ echo 'END OF BUILD ENVIRONMENT INFORMATION' CFLAGS_FOR_BUILD="$RPM_OPT_FLAGS"; export CFLAGS_FOR_BUILD %configure --enable-mpers=check -make %{?_smp_mflags} +%make_build %install -make DESTDIR=%{buildroot} install +%make_install # remove unpackaged files from the buildroot rm -f %{buildroot}%{_bindir}/strace-graph @@ -85,7 +91,7 @@ wait %check %{buildroot}%{_bindir}/strace -V -make %{?_smp_mflags} -k check VERBOSE=1 +%make_build -k check VERBOSE=1 echo 'BEGIN OF TEST SUITE INFORMATION' tail -n 99999 -- tests*/test-suite.log tests*/ksysent.gen.log find tests* -type f -name '*.log' -print0 | |