mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-11-22 01:21:44 +00:00
grub2-xcat build staff
Former-commit-id: 3fc7c33336756c6bff883e992021db8ae523a43f
This commit is contained in:
parent
32e01baaed
commit
2d595a0488
BIN
grub2-xcat/grub2-res.tar.gz
Normal file
BIN
grub2-xcat/grub2-res.tar.gz
Normal file
Binary file not shown.
73
grub2-xcat/grub2-xcat.spec
Normal file
73
grub2-xcat/grub2-xcat.spec
Normal file
@ -0,0 +1,73 @@
|
||||
Summary: grub2 resources generated by grub2-mknetdir
|
||||
Name: grub2-xcat
|
||||
Version: 1.0
|
||||
#Release: snap%(date +"%Y%m%d%H%M")
|
||||
Release: 1
|
||||
License: EPL
|
||||
Group: Applications/System
|
||||
Vendor: IBM Corp.
|
||||
Packager: IBM Corp.
|
||||
#Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
||||
Prefix: /tftpboot/boot/grub2
|
||||
BuildRoot: /var/tmp/%{name}-root
|
||||
BuildArch: noarch
|
||||
Source1: grub2-res.tar.gz
|
||||
|
||||
Provides: grub2-xcat
|
||||
Requires:/bin/sh
|
||||
|
||||
|
||||
%description
|
||||
grub2-xcat provides some grub2 resources generated by grub2-mknetdir,including grub2 modules and grub2 image.
|
||||
|
||||
%define _binaries_in_noarch_packages_terminate_build 0
|
||||
|
||||
%prep
|
||||
#cp ./grub2-res.tar.gz /root/rpmbuild/SOURCES/
|
||||
#%ifos linux
|
||||
#tar zxf %{SOURCE1}
|
||||
#%else
|
||||
#rm -rf tftpboot
|
||||
#cp %{SOURCE1} /opt/freeware/src/packages/BUILD
|
||||
#gunzip -f grub2-res.tar.gz
|
||||
#tar -xf grub2-res.tar
|
||||
#%endif
|
||||
|
||||
%build
|
||||
|
||||
%pre
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/%{prefix}/
|
||||
cd $RPM_BUILD_ROOT/%{prefix}/
|
||||
|
||||
%ifos linux
|
||||
tar zxf %{SOURCE1}
|
||||
%else
|
||||
cp %{SOURCE1} $RPM_BUILD_ROOT/%{prefix}/
|
||||
gunzip -f grub2-res.tar.gz
|
||||
tar -xf grub2-res.tar
|
||||
%endif
|
||||
|
||||
|
||||
|
||||
%post
|
||||
ln -s -f %{prefix}/powerpc-ieee1275/core.elf %{prefix}/grub2.ppc
|
||||
exit 0
|
||||
|
||||
%clean
|
||||
|
||||
|
||||
%files
|
||||
#%{prefix}
|
||||
# one for sles, one for rhel. yes, it's ugly...
|
||||
%{prefix}/powerpc-ieee1275/
|
||||
%defattr(-,root,root)
|
||||
|
||||
%postun
|
||||
|
||||
if [ "$1" = "0" ]; then
|
||||
rm %{prefix}/grub2.ppc
|
||||
fi
|
||||
true
|
13
grub2-xcat/readme
Normal file
13
grub2-xcat/readme
Normal file
@ -0,0 +1,13 @@
|
||||
#build steps:
|
||||
1.
|
||||
#cp ./grub2-res.tar.gz /root/rpmbuild/SOURCES/
|
||||
2.
|
||||
rpmbuild -bb ./grub2-xcat.spec
|
||||
|
||||
|
||||
#notes:
|
||||
the grub2-res.tar.gz is generated by:
|
||||
1.run the following cmd on a RHEL7-PPC64 node:
|
||||
#grub2-mknetdir --net-directory=/tftpboot/
|
||||
#cd /tftpboot/boot/grub2/
|
||||
#tar -czvf /tmp/grub2-res.tar.gz ./powerpc-ieee1275/
|
Loading…
Reference in New Issue
Block a user