dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone
27a4da
# vim:filetype=spec
2ba4b3
28f7f8
%global flagday 1:2.02-0.65.el7_4
2ba4b3
27a4da
# Modules always contain just 32-bit code
27a4da
%global _libdir %{_exec_prefix}/lib
27a4da
%global _binaries_in_noarch_packages_terminate_build 0
27a4da
#%%undefine _missing_build_ids_terminate_build
27a4da
%{expand:%%{!?buildsubdir:%%global buildsubdir grub-%{tarversion}}}
27a4da
%{expand:%%{!?_licensedir:%%global license %%%%doc}}
27a4da
27a4da
%if %{?_with_ccache: 1}%{?!_with_ccache: 0}
27a4da
%global cc_equals CC=/usr/%{_lib}/ccache/gcc
27a4da
%else
27a4da
%global cc_equals %{nil}
27a4da
%endif
27a4da
27a4da
%global efi_cflags %(echo %{optflags} | 			\\\
27a4da
	sed							\\\
27a4da
		-e 's/-O./-g3/g'				\\\
27a4da
		-e 's/-fstack-protector[[:alpha:]-]\\+//g'	\\\
27a4da
		-e 's/-Wp,-D_FORTIFY_SOURCE=[[:digit:]]\\+//g'	\\\
27a4da
		-e 's/--param=ssp-buffer-size=4//g'		\\\
27a4da
		-e 's/-mregparm=3/-mregparm=4/g'		\\\
27a4da
		-e 's/-fexceptions//g'				\\\
27a4da
		-e 's/-fasynchronous-unwind-tables//g'		\\\
27a4da
		-e 's/^/ -fno-strict-aliasing /' ) %{nil}
27a4da
%global legacy_cflags %(echo %{efi_cflags} |			\\\
27a4da
	sed							\\\
27a4da
		-e 's/-m64//g'					\\\
27a4da
		-e 's/-mcpu=power[[:alnum:]]\\+/-mcpu=power6/g'	\\\
27a4da
		) %{nil}
27a4da
27a4da
27a4da
%global with_efi_arch 0
27a4da
%global with_alt_efi_arch 0
27a4da
%global with_legacy_arch 0
28f7f8
%global with_legacy_utils 0
27a4da
%global grubefiarch %{nil}
27a4da
%global grublegacyarch %{nil}
27a4da
27a4da
# sparc is always compiled 64 bit
27a4da
%ifarch %{sparc}
27a4da
%global target_cpu_name sparc64
27a4da
%global _target_platform %{target_cpu_name}-%{_vendor}-%{_target_os}%{?_gnu}
27a4da
%global legacy_target_cpu_name %{_arch}
27a4da
%global legacy_package_arch ieee1275
27a4da
%global platform ieee1275
27a4da
%endif
27a4da
# ppc is always compiled 64 bit
27a4da
%ifarch ppc ppc64 ppc64le
27a4da
%global target_cpu_name %{_arch}
27a4da
%global legacy_target_cpu_name powerpc
27a4da
%global legacy_package_arch %{_arch}
27a4da
%global legacy_grub_dir powerpc-ieee1275
27a4da
%global _target_platform %{target_cpu_name}-%{_vendor}-%{_target_os}%{?_gnu}
27a4da
%global platform ieee1275
27a4da
%endif
27a4da
27a4da
%global efi_only aarch64 %{arm}
27a4da
%global efi_arch x86_64 ia64 %{efi_only}
27a4da
%ifarch %{efi_arch}
27a4da
%global with_efi_arch 1
27a4da
%else
27a4da
%global with_efi_arch 0
27a4da
%endif
27a4da
%ifarch %{efi_only}
27a4da
%global with_efi_only 1
27a4da
%else
27a4da
%global with_efi_only 0
27a4da
%endif
27a4da
%{!?with_efi_arch:%global without_efi_arch 0}
27a4da
%{?with_efi_arch:%global without_efi_arch 1}
27a4da
%{!?with_efi_only:%global without_efi_only 0}
27a4da
%{?with_efi_only:%global without_efi_only 1}
27a4da
27a4da
### fixme
27a4da
%ifarch aarch64 %{arm}
27a4da
%global efi_modules " http linux "
27a4da
%else
110f85
%global efi_modules " backtrace http linuxefi usb usbserial_common usbserial_pl2303 usbserial_ftdi usbserial_usbdebug keylayouts at_keyboard "
27a4da
%endif
27a4da
27a4da
%ifarch x86_64
27a4da
%global efiarch x64
27a4da
%global target_cpu_name %{_arch}
27a4da
%global grub_target_name %{_arch}-efi
27a4da
%global package_arch efi-x64
27a4da
27a4da
%global legacy_target_cpu_name i386
27a4da
%global legacy_package_arch pc
27a4da
%global platform pc
27a4da
27a4da
%global alt_efi_arch ia32
27a4da
%global alt_target_cpu_name i386
27a4da
%global alt_grub_target_name i386-efi
27a4da
%global alt_platform efi
27a4da
%global alt_package_arch efi-ia32
27a4da
%global alt_efi_cflags %(echo %{efi_cflags} |			\\\
27a4da
	sed							\\\
27a4da
		-e 's/-m64//g'				\\\
27a4da
	) %{nil}
27a4da
%endif
110f85
%ifarch %{ix86}
110f85
%global target_cpu_name %{_arch}
110f85
%global grub_target_name %{_arch}-pc
110f85
110f85
%global legacy_target_cpu_name i386
110f85
%global legacy_package_arch pc
110f85
%global platform pc
110f85
110f85
%global with_legacy_arch 0
110f85
%endif
27a4da
27a4da
%ifarch aarch64
27a4da
%global efiarch aa64
27a4da
%global target_cpu_name aarch64
27a4da
%global grub_target_name arm64-efi
27a4da
%global package_arch efi-aa64
27a4da
%endif
27a4da
27a4da
%ifarch %{arm}
27a4da
%global efiarch arm
27a4da
%global target_cpu_name arm
27a4da
%global grub_target_name arm-efi
27a4da
%global package_arch efi-arm
27a4da
%endif
27a4da
27a4da
%global _target_platform %{target_cpu_name}-%{_vendor}-%{_target_os}%{?_gnu}
27a4da
%global _alt_target_platform %{alt_target_cpu_name}-%{_vendor}-%{_target_os}%{?_gnu}
27a4da
27a4da
%ifarch %{efi_arch}
27a4da
%global with_efi_arch 1
27a4da
%global grubefiname grub%{efiarch}.efi
27a4da
%global grubeficdname gcd%{efiarch}.efi
27a4da
%global grubefiarch %{target_cpu_name}-efi
27a4da
%endif
27a4da
27a4da
%if 0%{?alt_efi_arch:1}
27a4da
%global with_alt_efi_arch 1
27a4da
%global grubaltefiname grub%{alt_efi_arch}.efi
27a4da
%global grubalteficdname gcd%{alt_efi_arch}.efi
27a4da
%global grubaltefiarch %{alt_target_cpu_name}-efi
27a4da
%endif
27a4da
27a4da
# Figure out the right file path to use
27a4da
%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/'))
27a4da
27a4da
%ifnarch %{efi_only}
27a4da
%global with_legacy_arch 1
28f7f8
%global with_legacy_utils 1
27a4da
%global grublegacyarch %{legacy_target_cpu_name}-%{platform}
27a4da
%global moduledir %{legacy_target_cpu_name}-%{platform}
27a4da
%endif
27a4da
27a4da
%global evr %{epoch}:%{version}-%{release}
27a4da
27a4da
%if %{with_legacy_arch}
27a4da
%global with_efi_common 0
27a4da
%global with_legacy_common 1
27a4da
%else
27a4da
%global with_efi_common 1
27a4da
%global with_legacy_common 0
27a4da
%endif
110f85
%ifarch %{ix86}
110f85
%global with_efi_arch 0
110f85
%global with_alt_efi_arch 0
110f85
%global with_efi_common 0
110f85
%global with_legacy_common 1
110f85
%global with_legacy_utils 1
110f85
%global with_legacy_arch 0
110f85
%endif
27a4da
27a4da
%if 0%{with_efi_common}
27a4da
%global common_srcdir grub-%{grubefiarch}-%{tarversion}
27a4da
%endif
27a4da
%if 0%{with_legacy_common}
27a4da
%global common_srcdir grub-%{grublegacyarch}-%{tarversion}
27a4da
%endif
27a4da
27a4da
%define define_legacy_variant()						\
27a4da
%{expand:%%package %{1}}						\
27a4da
Summary:	Bootloader with support for Linux, Multiboot, and more	\
27a4da
Group:		System Environment/Base					\
27a4da
Requires:	%{name}-common = %{evr}					\
27a4da
Requires:	%{name}-tools-minimal = %{evr}				\
27a4da
Requires:	%{name}-%{1}-modules = %{evr}				\
27a4da
Requires:	gettext which file					\
27a4da
Requires:	%{name}-tools-extra = %{evr}				\
27a4da
Requires:	%{name}-tools = %{evr}					\
27a4da
Requires(pre):	dracut							\
27a4da
Requires(post): dracut							\
27a4da
%{expand:%%description %{1}}						\
27a4da
%{desc}									\
27a4da
This subpackage provides support for %{1} systems.			\
27a4da
									\
27a4da
%{expand:%%{?!buildsubdir:%%define buildsubdir grub-%{1}-%{tarversion}}}\
27a4da
%{expand:%%package %{1}-modules}					\
27a4da
Summary:	Modules used to build custom grub images		\
27a4da
Group:		System Environment/Base					\
27a4da
BuildArch:	noarch							\
27a4da
Requires:	%{name}-common = %{evr}					\
27a4da
%{expand:%%description %{1}-modules}					\
27a4da
%{desc}									\
27a4da
This subpackage provides support for rebuilding your own grub.efi.	\
27a4da
									\
27a4da
%{expand:%%{?!buildsubdir:%%define buildsubdir grub-%{1}-%{tarversion}}}\
27a4da
%{expand:%%package %{1}-tools}						\
27a4da
Summary:	Support tools for GRUB.					\
27a4da
Group:		System Environment/Base					\
27a4da
Requires:	gettext os-prober which file system-logos		\
27a4da
Requires:	%{name}-common = %{evr}					\
27a4da
Requires:	%{name}-tools-minimal = %{evr}				\
27a4da
Requires:	os-prober >= 1.58-11					\
27a4da
Requires:	gettext which file					\
27a4da
									\
27a4da
%{expand:%%description %{1}-tools}					\
27a4da
%{desc}									\
27a4da
This subpackage provides tools for support of %{1} platforms.		\
27a4da
%{nil}
27a4da
27a4da
%define define_efi_variant(p)						\
27a4da
%{expand:%%package %{1}}						\
27a4da
Summary:	GRUB for EFI systems.					\
27a4da
Group:		System Environment/Base					\
27a4da
Requires:	%{name}-common = %{evr}					\
27a4da
Requires:	%{name}-tools-minimal >= %{evr}				\
27a4da
Requires:	%{name}-tools-extra = %{evr}				\
27a4da
Requires:	%{name}-tools = %{evr}					\
27a4da
%{-p:Provides:	%{name}-efi = %{evr}}					\
2ba4b3
%{-p:Obsoletes:	%{name}-efi <= %{flagday}}				\
27a4da
									\
27a4da
%{expand:%%description %{1}}						\
27a4da
%{desc}									\
27a4da
This subpackage provides support for %{1} systems.			\
27a4da
									\
27a4da
%{expand:%%{?!buildsubdir:%%define buildsubdir grub-%{1}-%{tarversion}}}\
27a4da
%{expand:%%package %{1}-modules}					\
27a4da
Summary:	Modules used to build custom grub.efi images		\
27a4da
Group:		System Environment/Base					\
27a4da
BuildArch:	noarch							\
27a4da
Requires:	%{name}-common = %{evr}					\
27a4da
%{-p:Provides:	%{name}-efi-modules = %{evr}}				\
2ba4b3
%{-p:Obsoletes:	%{name}-efi-modules <= %{flagday}}			\
27a4da
%{expand:%%description %{1}-modules}					\
27a4da
%{desc}									\
27a4da
This subpackage provides support for rebuilding your own grub.efi.	\
27a4da
									\
27a4da
%{expand:%%package %{1}-cdboot}						\
27a4da
Summary:	Files used to boot removeable media with EFI		\
27a4da
Group:		System Environment/Base					\
27a4da
Requires:	%{name}-common = %{evr}					\
27a4da
%{expand:%%description %{1}-cdboot}					\
27a4da
%{desc}									\
27a4da
This subpackage provides optional components of grub used with removeable media on %{1} systems.\
27a4da
%{nil}
27a4da
27a4da
%global do_common_setup()					\
27a4da
%setup -D -q -T -a 0 -n grub-%{tarversion}			\
27a4da
cd grub-%{tarversion}						\
27a4da
rm -fv docs/*.info						\
c4e390
cp %{SOURCE3} unifont.pcf.gz					\
c4e390
cp %{SOURCE4} .gitignore					\
27a4da
git init							\
27a4da
echo '![[:digit:]][[:digit:]]_*.in' > util/grub.d/.gitignore	\
27a4da
echo '!*.[[:digit:]]' > util/.gitignore				\
27a4da
git config user.email "%{name}-owner@fedoraproject.org"		\
27a4da
git config user.name "Fedora Ninjas"				\
27a4da
git config gc.auto 0						\
27a4da
git add .							\
27a4da
git commit -a -q -m "%{tarversion} baseline."			\
27a4da
git am %%{patches} 
27a4da
git config --unset user.email					\
27a4da
git config --unset user.name					\
27a4da
cd ..								\
27a4da
%{nil}
27a4da
27a4da
%global do_setup()						\
27a4da
cp -al grub-%{tarversion} grub-%{1}-%{tarversion}		\
27a4da
%{nil}
27a4da
27a4da
%global do_common_build()					\
27a4da
cd %{common_srcdir}						\
27a4da
makeinfo --info --no-split -I docs -o docs/grub-dev.info	\\\
27a4da
	docs/grub-dev.texi					\
27a4da
makeinfo --info --no-split -I docs -o docs/grub.info		\\\
27a4da
	docs/grub.texi						\
27a4da
makeinfo --html --no-split -I docs -o docs/grub-dev.html	\\\
27a4da
	docs/grub-dev.texi					\
27a4da
makeinfo --html --no-split -I docs -o docs/grub.html		\\\
27a4da
	docs/grub.texi						\
27a4da
cd ..								\
27a4da
%{nil}
27a4da
27a4da
%define do_efi_configure()					\
27a4da
./autogen.sh							\
27a4da
%configure							\\\
27a4da
	%{cc_equals}						\\\
27a4da
	CFLAGS="%{2}"						\\\
27a4da
	TARGET_LDFLAGS=-static					\\\
27a4da
        --with-platform=efi					\\\
27a4da
	--target=%{1}						\\\
27a4da
	--with-grubdir=%{name}					\\\
27a4da
        --program-transform-name=s,grub,%{name},		\\\
27a4da
	--disable-grub-mount					\\\
27a4da
	--disable-werror					\
27a4da
%{nil}
27a4da
27a4da
%define do_efi_build_modules()					\
27a4da
make %{?_smp_mflags} ascii.h widthspec.h			\
27a4da
make %{?_smp_mflags} -C grub-core				\
27a4da
%{nil}
27a4da
27a4da
%define do_efi_build_all()					\
27a4da
make %{?_smp_mflags}						\
27a4da
%{nil}
27a4da
27a4da
%define do_efi_link_utils()					\
27a4da
for x in grub-mkimage ; do					\\\
27a4da
	ln ../grub-%{1}-%{tarversion}/${x} ./ ;			\\\
27a4da
done								\
27a4da
%{nil}
27a4da
27a4da
%ifarch x86_64 aarch64
27a4da
%define mkimage()						\
27a4da
%{4}./grub-mkimage -O %{1} -o %{2}.orig				\\\
b1bcb2
	-p /EFI/%{efidir} -d grub-core ${GRUB_MODULES}		\\\
b1bcb2
	--sbat %{4}./sbat.csv					\
27a4da
%{4}./grub-mkimage -O %{1} -o %{3}.orig				\\\
b1bcb2
	-p /EFI/BOOT -d grub-core ${GRUB_MODULES}		\\\
b1bcb2
	--sbat %{4}./sbat.csv					\
c4e390
%{expand:%%{pesign -s -i %{2}.orig -o %{2}.one -a %{5} -c %{6} -n %{7}}}	\
c4e390
%{expand:%%{pesign -s -i %{3}.orig -o %{3}.one -a %{5} -c %{6} -n %{7}}}	\
c4e390
%{expand:%%{pesign -s -i %{2}.one -o %{2} -a %{8} -c %{9} -n %{10}}}	\
c4e390
%{expand:%%{pesign -s -i %{3}.one -o %{3} -a %{8} -c %{9} -n %{10}}}	\
27a4da
%{nil}
27a4da
%else
27a4da
%define mkimage()						\
27a4da
%{4}./grub-mkimage -O %{1} -o %{2}				\\\
27a4da
	-p /EFI/%{efidir} -d grub-core ${GRUB_MODULES}		\
27a4da
%{4}./grub-mkimage -O %{1} -o %{3}				\\\
27a4da
	-p /EFI/BOOT -d grub-core ${GRUB_MODULES}		\
27a4da
%{nil}
27a4da
%endif
27a4da
27a4da
%define do_efi_build_images()					\
27a4da
GRUB_MODULES="	all_video boot btrfs cat chain configfile echo	\\\
27a4da
		efifwsetup efinet ext2 fat font gfxmenu gfxterm \\\
27a4da
		gzio halt hfsplus iso9660 jpeg loadenv loopback \\\
27a4da
		lvm mdraid09 mdraid1x minicmd normal part_apple \\\
27a4da
		part_msdos part_gpt password_pbkdf2 png reboot	\\\
110f85
		regexp search search_fs_uuid search_fs_file	\\\
27a4da
		search_label serial sleep syslinuxcfg test tftp \\\
27a4da
		video xfs"					\
27a4da
GRUB_MODULES+=%{efi_modules}					\
c4e390
%{expand:%%{mkimage %{1} %{2} %{3} %{4} %{5} %{6} %{7} %{8} %{9} %{10}}} \
27a4da
%{nil}
27a4da
27a4da
%define do_primary_efi_build()					\
27a4da
cd grub-%{1}-%{tarversion}					\
27a4da
%{expand:%%do_efi_configure %%{4} %%{5}}			\
27a4da
%do_efi_build_all						\
c4e390
%{expand:%%do_efi_build_images %{grub_target_name} %{2} %{3} ./ %{6} %{7} %{8} %{9} %{10} %{11}}\
27a4da
cd ..								\
27a4da
%{nil}
27a4da
27a4da
%define do_alt_efi_build()					\
27a4da
cd grub-%{1}-%{tarversion}					\
27a4da
%{expand:%%do_efi_configure %%{4} %%{5}}			\
27a4da
%do_efi_build_modules						\
27a4da
%{expand:%%do_efi_link_utils %{grubefiarch}}			\
c4e390
%{expand:%%do_efi_build_images %{alt_grub_target_name} %{2} %{3} ../grub-%{grubefiarch}-%{tarversion}/ %{6} %{7} %{8} %{9} %{10} %{11}} \
27a4da
cd ..								\
27a4da
%{nil}
27a4da
27a4da
%define do_legacy_build()					\
27a4da
cd grub-%{1}-%{tarversion}					\
27a4da
./autogen.sh							\
27a4da
%configure							\\\
27a4da
	%{cc_equals}						\\\
27a4da
	CFLAGS="%{legacy_cflags}"				\\\
27a4da
	TARGET_LDFLAGS=-static					\\\
27a4da
        --with-platform=%{platform}				\\\
27a4da
	--target=%{_target_platform}				\\\
27a4da
	--with-grubdir=%{name}					\\\
27a4da
        --program-transform-name=s,grub,%{name},		\\\
27a4da
	--disable-grub-mount					\\\
27a4da
	--disable-werror					\
27a4da
make %{?_smp_mflags}						\
27a4da
cd ..								\
27a4da
%{nil}
27a4da
27a4da
%define do_alt_efi_install()					\
27a4da
cd grub-%{1}-%{tarversion}					\
27a4da
install -d -m 755 $RPM_BUILD_ROOT/usr/lib/grub/%{grubaltefiarch}/ \
27a4da
find . '(' -iname gdb_grub					\\\
27a4da
	-o -iname kernel.exec					\\\
27a4da
	-o -iname kernel.img					\\\
27a4da
	-o -iname config.h					\\\
27a4da
	-o -iname gmodule.pl					\\\
27a4da
	-o -iname modinfo.sh					\\\
27a4da
	-o -iname '*.lst'					\\\
27a4da
	-o -iname '*.mod'					\\\
27a4da
	')'							\\\
27a4da
	-exec cp {} $RPM_BUILD_ROOT/usr/lib/grub/%{grubaltefiarch}/ \\\; \
27a4da
find $RPM_BUILD_ROOT -iname "*.mod*" -exec chmod a-x {} '\;'	\
28f7f8
install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2}	\
28f7f8
install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \
27a4da
cd ..								\
27a4da
%{nil}
27a4da
27a4da
%define do_efi_install()					\
27a4da
cd grub-%{1}-%{tarversion}					\
28f7f8
install -m 700 -d $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/	\
28f7f8
install -m 700 -d $RPM_BUILD_ROOT/boot/grub2/			\
27a4da
make DESTDIR=$RPM_BUILD_ROOT install				\
27a4da
if [ -f $RPM_BUILD_ROOT%{_infodir}/grub.info ]; then		\
27a4da
	rm -f $RPM_BUILD_ROOT%{_infodir}/grub.info		\
27a4da
fi								\
27a4da
if [ -f $RPM_BUILD_ROOT%{_infodir}/grub-dev.info ]; then	\
27a4da
	rm -f $RPM_BUILD_ROOT%{_infodir}/grub-dev.info		\
27a4da
fi								\
27a4da
find $RPM_BUILD_ROOT -iname "*.module" -exec chmod a-x {} '\;'	\
27a4da
touch $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/grub.cfg		\
27a4da
ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg			\\\
27a4da
	$RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg		\
28f7f8
install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2}	\
28f7f8
install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \
28f7f8
install -D -m 700 unicode.pf2					\\\
27a4da
	$RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/fonts/unicode.pf2\
27a4da
cd ..								\
27a4da
%{nil}
27a4da
27a4da
%define do_legacy_install()					\
27a4da
cd grub-%{1}-%{tarversion}					\
27a4da
make DESTDIR=$RPM_BUILD_ROOT install				\
27a4da
if [ -f $RPM_BUILD_ROOT%{_infodir}/grub.info ]; then		\
27a4da
	rm -f $RPM_BUILD_ROOT%{_infodir}/grub.info		\
27a4da
fi								\
27a4da
if [ -f $RPM_BUILD_ROOT%{_infodir}/grub-dev.info ]; then	\
27a4da
	rm -f $RPM_BUILD_ROOT%{_infodir}/grub-dev.info		\
27a4da
fi								\
28f7f8
touch ${RPM_BUILD_ROOT}/boot/%{name}/grub.cfg			\
27a4da
ln -s ../boot/%{name}/grub.cfg					\\\
27a4da
	${RPM_BUILD_ROOT}%{_sysconfdir}/grub2.cfg		\
27a4da
cd ..								\
27a4da
if [ -f $RPM_BUILD_ROOT/%{_libdir}/grub/%{1}/grub2.chrp ]; then \
27a4da
	mv $RPM_BUILD_ROOT/%{_libdir}/grub/%{1}/grub2.chrp	\\\
27a4da
	   $RPM_BUILD_ROOT/%{_libdir}/grub/%{1}/grub.chrp	\
27a4da
fi								\
27a4da
%{nil}
27a4da
27a4da
%define do_common_install()					\
27a4da
cd %{common_srcdir}						\
27a4da
install -d -m 0755 						\\\
27a4da
	$RPM_BUILD_ROOT%{_datarootdir}/locale/en\@quot		\\\
27a4da
	$RPM_BUILD_ROOT%{_datarootdir}/locale/en		\\\
27a4da
	$RPM_BUILD_ROOT%{_infodir}/				\
27a4da
cp -a $RPM_BUILD_ROOT%{_datarootdir}/locale/en\@quot		\\\
27a4da
	$RPM_BUILD_ROOT%{_datarootdir}/locale/en		\
27a4da
cp docs/grub.info $RPM_BUILD_ROOT%{_infodir}/%{name}.info	\
27a4da
cp docs/grub-dev.info						\\\
27a4da
	$RPM_BUILD_ROOT%{_infodir}/%{name}-dev.info		\
27a4da
# Ghost config file						\
28f7f8
install -d -m 0700 ${RPM_BUILD_ROOT}/boot/efi/EFI/%{efidir}/	\
28f7f8
install -d -m 0700 ${RPM_BUILD_ROOT}/boot/grub2/		\
27a4da
install -d -m 0755 ${RPM_BUILD_ROOT}/boot/%{name}/themes/system	\
27a4da
install -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/default	\
27a4da
install -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig	\
27a4da
touch ${RPM_BUILD_ROOT}%{_sysconfdir}/default/grub		\
28f7f8
ln -sf ../default/grub						\\\
27a4da
	${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/grub		\
28f7f8
ln -sf ../efi/EFI/%{efidir}/grubenv				\\\
28f7f8
	$RPM_BUILD_ROOT/boot/grub2/grubenv			\
27a4da
cd ..								\
27a4da
%{nil}
27a4da
27a4da
%define define_legacy_variant_files()				\
27a4da
%{expand:%%files %{1}}						\
27a4da
%defattr(-,root,root,-)						\
27a4da
%config(noreplace) %{_sysconfdir}/%{name}.cfg			\
27a4da
%ghost %config(noreplace) /boot/%{name}/grub.cfg		\
27a4da
								\
27a4da
%{expand:%%files %{1}-modules}					\
27a4da
%defattr(-,root,root)						\
27a4da
%dir %{_libdir}/grub/%{2}/					\
27a4da
%{_libdir}/grub/%{2}/*						\
27a4da
%exclude %{_libdir}/grub/%{2}/*.module				\
27a4da
%exclude %{_libdir}/grub/%{2}/{boot,boot_hybrid,cdboot,diskboot,lzma_decompress,pxeboot}.{image,img}						\
27a4da
%exclude %{_libdir}/grub/%{2}/*.o				\
27a4da
%{nil}
27a4da
27a4da
%define define_efi_variant_files()				\
27a4da
%{expand:%%files %{1}}						\
27a4da
%defattr(-,root,root,-)						\
27a4da
%config(noreplace) %{_sysconfdir}/%{name}-efi.cfg		\
d62cf1
%verify(not mtime) %dir %attr(0700,root,root)/boot/efi/EFI/%{efidir} \
d62cf1
%verify(not mtime) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/%{2} \
d62cf1
%verify(not mtime) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/fonts \
d62cf1
%ghost %config(noreplace) %verify(not mtime) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/grub.cfg \
d62cf1
%config(noreplace) /boot/grub2/grubenv						\
27a4da
%ghost %config(noreplace) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/grubenv \
27a4da
								\
27a4da
%{expand:%%files %{1}-modules}					\
27a4da
%defattr(-,root,root,-)						\
27a4da
%dir %{_libdir}/grub/%{6}/					\
27a4da
%{_libdir}/grub/%{6}/*						\
27a4da
%exclude %{_libdir}/grub/%{6}/*.module				\
27a4da
								\
27a4da
%{expand:%%files %{1}-cdboot}					\
27a4da
%defattr(-,root,root,-)						\
d62cf1
%verify(not mtime) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/%{3} \
d62cf1
%verify(not mtime) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/fonts \
27a4da
%{nil}