forked from pool/grub2
Accepting request 229564 from home:michael-chang:branches:Base:System
- add grub2-x86_64-xen subpackage (bnc#863821) OBS-URL: https://build.opensuse.org/request/show/229564 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=86
This commit is contained in:
parent
2f3c8bd3cd
commit
60734cece4
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 10 07:39:30 UTC 2014 - mchang@suse.com
|
||||
|
||||
- add grub2-x86_64-xen subpackage (bnc#863821)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 5 14:27:45 UTC 2014 - arvidjaar@gmail.com
|
||||
|
||||
|
66
grub2.spec
66
grub2.spec
@ -55,6 +55,7 @@ BuildRequires: xz-devel
|
||||
BuildRequires: openssl >= 0.9.8
|
||||
BuildRequires: pesign-obs-integration
|
||||
%endif
|
||||
BuildRequires: xen-devel
|
||||
%endif
|
||||
|
||||
# Modules code is dynamically loaded and collected from a _fixed_ path.
|
||||
@ -234,6 +235,23 @@ provides support for EFI systems.
|
||||
|
||||
%endif
|
||||
|
||||
%ifarch x86_64
|
||||
|
||||
%package %{_target_cpu}-xen
|
||||
|
||||
Summary: Bootloader with support for Linux, Multiboot and more
|
||||
Group: System/Boot
|
||||
Provides: %{name}-xen = %{version}-%{release}
|
||||
Obsoletes: %{name}-xen < %{version}-%{release}
|
||||
|
||||
%description %{_target_cpu}-xen
|
||||
The GRand Unified Bootloader (GRUB) is a highly configurable and customizable
|
||||
bootloader with modular architecture. It supports rich variety of kernel formats,
|
||||
file systems, computer architectures and hardware devices. This subpackage
|
||||
provides support for XEN systems.
|
||||
|
||||
%endif
|
||||
|
||||
%package snapper-plugin
|
||||
|
||||
Summary: Grub2's snapper plugin
|
||||
@ -306,6 +324,9 @@ mkdir build
|
||||
%ifarch %{efi}
|
||||
mkdir build-efi
|
||||
%endif
|
||||
%ifarch x86_64
|
||||
mkdir build-xen
|
||||
%endif
|
||||
|
||||
%build
|
||||
# autogen calls autoreconf -vi
|
||||
@ -321,6 +342,37 @@ CXXFLAGS=" "
|
||||
FFLAGS=" "
|
||||
export CFLAGS CXXFLAGS FFLAGS
|
||||
|
||||
%ifarch x86_64
|
||||
cd build-xen
|
||||
../configure \
|
||||
TARGET_LDFLAGS=-static \
|
||||
--prefix=%{_prefix} \
|
||||
--sysconfdir=%{_sysconfdir} \
|
||||
--target=%{_target_platform} \
|
||||
--libdir=%{_libdir} \
|
||||
--with-platform=xen \
|
||||
--program-transform-name=s,grub,%{name},
|
||||
make %{?_smp_mflags}
|
||||
|
||||
cat > ./grub.cfg <<EOF
|
||||
insmod part_msdos
|
||||
insmod part_gpt
|
||||
insmod search
|
||||
insmod configfile
|
||||
insmod legacy_configfile
|
||||
if search -s root -f /boot/grub2/grub.cfg ; then
|
||||
configfile /boot/grub2/grub.cfg
|
||||
elif search -s root -f /@/boot/grub2/grub.cfg ; then
|
||||
configfile /@/boot/grub2/grub.cfg
|
||||
elif search -s root -f /boot/grub/menu.lst ; then
|
||||
legacy_configfile /boot/grub/menu.lst
|
||||
fi
|
||||
EOF
|
||||
./grub-mkstandalone --grub-mkimage=./grub-mkimage -o grub.xen -O %{_target_cpu}-xen -d grub-core/ "/boot/grub/grub.cfg=./grub.cfg"
|
||||
|
||||
cd ..
|
||||
%endif
|
||||
|
||||
%ifarch %{efi}
|
||||
cd build-efi
|
||||
../configure \
|
||||
@ -413,6 +465,14 @@ make %{?_smp_mflags}
|
||||
%endif
|
||||
|
||||
%install
|
||||
|
||||
%ifarch x86_64
|
||||
cd build-xen
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
install -m 644 grub.xen $RPM_BUILD_ROOT%{_libdir}/%{name}/%{_target_cpu}-xen/.
|
||||
cd ..
|
||||
%endif
|
||||
|
||||
%ifarch %{efi}
|
||||
cd build-efi
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
@ -753,4 +813,10 @@ fi
|
||||
%dir %{_libdir}/snapper/plugins
|
||||
%{_libdir}/snapper/plugins/grub
|
||||
|
||||
%ifarch x86_64
|
||||
%files %{_target_cpu}-xen
|
||||
%dir %{_libdir}/%{name}/%{_target_cpu}-xen
|
||||
%{_libdir}/%{name}/%{_target_cpu}-xen/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user