efi-rpm-macros/0007-Make-a-macros.efi-srpm...

124 lines
3.5 KiB
Diff

From 09efa919eb4a85bd77fe8d482f4c369e1fc29ed7 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 1 May 2018 15:42:01 -0400
Subject: [PATCH 7/7] Make a macros.efi-srpm that defines %{efi}
Signed-off-by: Peter Jones <pjones@redhat.com>
---
Makefile | 3 ++-
.gitignore | 1 +
efi-rpm-macros.spec.in | 17 ++++++++++++++++-
macros.efi-srpm.in | 20 ++++++++++++++++++++
macros.efi.in | 2 +-
5 files changed, 40 insertions(+), 3 deletions(-)
create mode 100644 macros.efi-srpm.in
diff --git a/Makefile b/Makefile
index 53f10c5a9eb..b9a04dddb5d 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ EFI_ESP_ROOT ?= /boot/efi
EFI_ARCHES ?= x86_64 aarch64 %{arm} %{ix86}
EFI_VENDOR ?=
-TARGETS = macros.efi efi-rpm-macros.spec
+TARGETS = macros.efi macros.efi-srpm efi-rpm-macros.spec
check_efi_vendor :
ifeq ($(EFI_VENDOR),)
@@ -35,6 +35,7 @@ install : | check_efi_vendor
install : $(TARGETS)
install -d -m 0755 $(DESTDIR)/$(MACRODIR)
install -m 0644 macros.efi $(DESTDIR)/$(MACRODIR)/
+ install -m 0644 macros.efi-srpm $(DESTDIR)/$(MACRODIR)/
$(TARGETS) :
% : %.in
diff --git a/.gitignore b/.gitignore
index 6c98e5354ab..8365ee70797 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
*~
.*.sw?
macros.efi
+macros.efi-srpm
efi-rpm-macros.spec
*.tar.*
usr/
diff --git a/efi-rpm-macros.spec.in b/efi-rpm-macros.spec.in
index fa68b1dd7b1..5aa11d4c903 100644
--- a/efi-rpm-macros.spec.in
+++ b/efi-rpm-macros.spec.in
@@ -18,6 +18,15 @@ Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-
%description
%{name} provides a set of RPM macros for use in EFI-related packages.
+%package -n efi-srpm-macros
+Summary: Common SRPM Macros for building EFI-related packages
+Group: Development/System
+BuildArch: noarch
+Requires: rpm
+
+%description -n efi-srpm-macros
+efi-srpm-macros provides a set of SRPM macros for use in EFI-related packages.
+
%prep
%autosetup -S git
@@ -31,7 +40,13 @@ Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc README
-%{_rpmmacrodir}/*
+%{_rpmmacrodir}/macros.efi
+
+%files -n efi-srpm-macros
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%doc README
+%{_rpmmacrodir}/macros.efi-srpm
%changelog
* Tue May 01 2018 Peter Jones <pjones@redhat.com> - 2-1
diff --git a/macros.efi-srpm.in b/macros.efi-srpm.in
new file mode 100644
index 00000000000..7192b07ba6c
--- /dev/null
+++ b/macros.efi-srpm.in
@@ -0,0 +1,20 @@
+#
+# EFI specific SRPM macro definitions
+#
+# Copyright 2018 Peter M Jones <pjones@redhat.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+
+%efi @@EFI_ARCHES@@
diff --git a/macros.efi.in b/macros.efi.in
index f4c70617ae7..c61b3972f2d 100644
--- a/macros.efi.in
+++ b/macros.efi.in
@@ -1,5 +1,5 @@
#
-# EFI specific macro definitions
+# EFI specific RPM macro definitions
#
# Copyright 2018 Peter M Jones <pjones@redhat.com>
#
--
2.14.3