use distribution LDFLAGS during build (#1548559)

This commit is contained in:
Jan Synacek 2018-02-26 11:42:54 +01:00
parent ef8a730bac
commit d81baccc87
2 changed files with 14 additions and 7 deletions

View File

@ -1,8 +1,8 @@
Fedora specific Makefile patch.
--- sgpio/Makefile.orig 2008-10-29 09:55:50.000000000 +0100
+++ sgpio/Makefile 2008-10-29 09:59:00.000000000 +0100
@@ -23,12 +23,15 @@
--- sgpio/Makefile 2008-11-24 12:27:12.000000000 +0100
+++ sgpio-new/Makefile 2018-02-26 11:32:14.394597823 +0100
@@ -23,25 +23,29 @@
MANDIR ?= /usr/local/man
@ -10,6 +10,7 @@ Fedora specific Makefile patch.
+INSTALL =/usr/bin/install -c
ALL = sgpio
+CFLAGS = -g -Wall
+LDFLAGS =
all: $(ALL)
@ -18,8 +19,11 @@ Fedora specific Makefile patch.
+ gcc $(CFLAGS) -c sgpio.c
sgpio: sgpio.o
gcc -g sgpio.o -o sgpio
@@ -38,10 +41,10 @@ clean:
- gcc -g sgpio.o -o sgpio
+ gcc $(LDFLAGS) sgpio.o -o sgpio
clean:
rm -f sgpio.o sgpio
install: $(ALL)
for i in $(ALL); do \

View File

@ -1,7 +1,7 @@
Summary: SGPIO captive backplane tool
Name: sgpio
Version: 1.2.0.10
Release: 20%{?dist}
Release: 21%{?dist}
License: GPLv2+
Group: System Environment/Base
URL: http://sources.redhat.com/lvm2/wiki/DMRAID_Eventing
@ -25,7 +25,7 @@ chmod a-x *
%build
#@@@ workaround for #474755 - remove with next update
make clean
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
%install
make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT SBIN_DIR=$RPM_BUILD_ROOT%{_sbindir} MANDIR=$RPM_BUILD_ROOT%{_mandir}
@ -36,6 +36,9 @@ make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT SBIN_DIR=$RPM_BUI
%{_mandir}/man1/sgpio.*
%changelog
* Mon Feb 26 2018 Jan Synáček <jsynacek@redhat.com> - 1.2.0.10-21
- use distribution LDFLAGS during build (#1548559)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0.10-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild