Simplify some of the macros a bit.

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2017-08-17 12:48:25 -04:00
parent 4c9532d2f6
commit 5d2d7c66f6
2 changed files with 15 additions and 22 deletions

View file

@ -6,6 +6,7 @@
%{expand:%%{!?buildsubdir:%%global buildsubdir grub-%{tarversion}}}
%{expand:%%{!?_licensedir:%%global license %%%%doc}}
%global _configure ../configure
%if %{?_with_ccache: 1}%{?!_with_ccache: 0}
%global cc_equals CC=/usr/%{_lib}/ccache/gcc
@ -251,23 +252,6 @@ git commit -a -q -m "%{tarversion} baseline." \
git am %%{patches} </dev/null \
git config --unset user.email \
git config --unset user.name \
%global _configure ../configure \
%{nil}
%global do_setup() \
mkdir grub-%{1}-%{tarversion} \
cp %{SOURCE4} grub-%{1}-%{tarversion}/unifont.pcf.gz \
%{nil}
%global do_common_build() \
makeinfo --info --no-split -I docs -o docs/grub-dev.info \\\
docs/grub-dev.texi \
makeinfo --info --no-split -I docs -o docs/grub.info \\\
docs/grub.texi \
makeinfo --html --no-split -I docs -o docs/grub-dev.html \\\
docs/grub-dev.texi \
makeinfo --html --no-split -I docs -o docs/grub.html \\\
docs/grub.texi \
%{nil}
%define do_efi_configure() \

View file

@ -156,16 +156,18 @@ This subpackage provides tools for support of all platforms.
%endif
%prep
# %%setup -T -c -n grub-%%{tarversion}
%do_common_setup
%if 0%{with_efi_arch}
%{expand:%do_setup %%{grubefiarch}}
mkdir grub-%{grubefiarch}-%{tarversion}
cp %{SOURCE4} grub-%{grubefiarch}-%{tarversion}/unifont.pcf.gz
%endif
%if 0%{with_alt_efi_arch}
%{expand:%do_setup %%{grubaltefiarch}}
mkdir grub-%{grubaltefiarch}-%{tarversion}
cp %{SOURCE4} grub-%{grubaltefiarch}-%{tarversion}/unifont.pcf.gz
%endif
%if 0%{with_legacy_arch}
%{expand: %do_setup %%{grublegacyarch}}
mkdir grub-%{grublegacyarch}-%{tarversion}
cp %{SOURCE4} grub-%{grublegacyarch}-%{tarversion}/unifont.pcf.gz
%endif
%build
@ -178,7 +180,14 @@ This subpackage provides tools for support of all platforms.
%if 0%{with_legacy_arch}
%{expand:%do_legacy_build %%{grublegacyarch}}
%endif
%do_common_build
makeinfo --info --no-split -I docs -o docs/grub-dev.info \
docs/grub-dev.texi
makeinfo --info --no-split -I docs -o docs/grub.info \
docs/grub.texi
makeinfo --html --no-split -I docs -o docs/grub-dev.html \
docs/grub-dev.texi
makeinfo --html --no-split -I docs -o docs/grub.html \
docs/grub.texi
%install
set -e