File fwupdate-suse-build.patch of Package fwupdate.16148
From d8606481171c167e6ec50de5ed630f19d4622182 Mon Sep 17 00:00:00 2001
From: Gary Lin <glin@suse.com>
Date: Wed, 2 Dec 2015 16:10:08 +0800
Subject: [PATCH 1/3] Install programs the SUSE way
Also avoid installing po files.
---
Make.defaults | 2 +-
linux/Makefile | 1 -
linux/cleanup.in | 4 ++--
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Make.defaults b/Make.defaults
index 912a893..b8dd67f 100644
--- a/Make.defaults
+++ b/Make.defaults
@@ -39,4 +39,4 @@ libdatadir ?= $(prefix)lib/
EFIDIR ?= redhat
DEBUGINFO ?= $(prefix)lib/debug/
DEBUGSOURCE ?= $(prefix)src/debug/
-TARGETDIR ?= /boot/efi/EFI/$(EFIDIR)/
+TARGETDIR ?= ${libdir}/efi/
diff --git a/linux/Makefile b/linux/Makefile
index 5821467..a6839c6 100644
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -86,7 +86,6 @@ install : all
$(INSTALL) -d -m 755 $(DESTDIR)/$(includedir)/
$(INSTALL) -m 644 $(INCTARGETS) $(DESTDIR)/$(includedir)/
$(INSTALL) -d -m 755 $(DESTDIR)/$(localedir)/en/
- $(INSTALL) -m 644 $(POTARGETS) $(DESTDIR)/$(localedir)/en/
$(INSTALL) -d -m 755 $(DESTDIR)/$(bindir)
$(foreach x, $(BINTARGETS), $(INSTALL) -m 755 $(x) $(DESTDIR)/$(bindir);)
$(foreach x, $(wildcard *.so.$(VERSION)), ln -fs $(x) $(patsubst %.so.$(VERSION),%.so,$(DESTDIR)/$(libdir)/$(x)); ln -fs $(x) $(patsubst %.so.$(VERSION),%.so.$(MAJOR_VERSION),$(DESTDIR)/$(libdir)/$(x));)
diff --git a/linux/cleanup.in b/linux/cleanup.in
index 10fdc8a..5d3bd8b 100755
--- a/linux/cleanup.in
+++ b/linux/cleanup.in
@@ -1,6 +1,6 @@
#!/bin/sh
set -e
-if [ -e "@@DATADIR@@fwupdate/done" ]; then
+if [ -e "/run/fwupdate/done" ]; then
exit 0
fi
@@ -23,4 +23,4 @@ for x in /sys/firmware/efi/efivars/fwupdate-*-0abba7dc-e516-4167-bbf5-4d9d1c7394
fi
done
-touch "@@DATADIR@@/fwupdate/done"
+touch "/run/fwupdate/done"
--
2.9.0
From 2c370b0e68ce125e7e50f1406a3d9233aee789b5 Mon Sep 17 00:00:00 2001
From: Gary Lin <glin@suse.com>
Date: Wed, 13 Jul 2016 17:59:34 +0800
Subject: [PATCH 2/3] Skip the installation of the build-id of fwup*.efi
---
efi/Makefile | 3 ---
1 file changed, 3 deletions(-)
diff --git a/efi/Makefile b/efi/Makefile
index 8a3c6bd..8c44309 100644
--- a/efi/Makefile
+++ b/efi/Makefile
@@ -99,9 +99,6 @@ define inst =
$(INSTALL) -m 755 $(1) $(DESTDIR)$(TARGETDIR)$(1)
$(INSTALL) -d -m 755 $(DESTDIR)$(DEBUGINFO)$(TARGETDIR)
$(INSTALL) -m 755 $(1).debug $(DESTDIR)$(DEBUGINFO)$(TARGETDIR)/$(1).debug
- $(INSTALL) -d -m 755 $(DESTDIR)$(DEBUGINFO).build-id/$(dir $(shell cat $(1).build-id))
- ln -sf ../../../../..$(TARGETDIR)$(1) $(DESTDIR)$(DEBUGINFO).build-id/$(shell cat $(1).build-id)
- ln -sf ../..$(TARGETDIR)$(1).debug $(DESTDIR)$(DEBUGINFO).build-id/$(shell cat $(1).build-id).debug
endef
install : $(FWUP).efi | $(FWUP).efi.debug $(FWUP).efi.build-id
--
2.9.0
From 7527c30b3139acf9bbf2205243ee7a73169bf753 Mon Sep 17 00:00:00 2001
From: Gary Lin <glin@suse.com>
Date: Fri, 15 Jul 2016 11:40:24 +0800
Subject: [PATCH 3/3] Use the OPT_FLAGS for the user space programs
---
linux/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux/Makefile b/linux/Makefile
index a6839c6..7c9fec1 100644
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -5,7 +5,7 @@ include $(TOPDIR)/Make.defaults
LIB_LIBS= pthread
BIN_LIBS= popt pthread
PKLIBS = efivar efiboot
-CFLAGS ?= -g -O0
+CFLAGS ?= $(OPT_FLAGS)
PJONES =
BIN_CCLDFLAGS = $(foreach lib,$(BIN_LIBS),-l$(lib)) \
$(foreach pklib,$(PKLIBS), \
--
2.9.0