2014-03-02 23:05:09 +00:00
|
|
|
Summary: Utilities to make xCAT work in a SoftLayer environment
|
|
|
|
Name: xCAT-SoftLayer
|
|
|
|
Version: %(cat Version)
|
|
|
|
Release: snap%(date +"%Y%m%d%H%M")
|
|
|
|
Epoch: 4
|
|
|
|
License: EPL
|
|
|
|
Group: Applications/System
|
|
|
|
Source: xCAT-SoftLayer-%(cat Version).tar.gz
|
|
|
|
Packager: IBM Corp.
|
|
|
|
Vendor: IBM Corp.
|
|
|
|
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
|
|
|
Prefix: /opt/xcat
|
|
|
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
|
2014-03-18 21:20:19 +00:00
|
|
|
%ifos linux
|
2014-03-02 23:05:09 +00:00
|
|
|
BuildArch: noarch
|
2014-03-18 21:20:19 +00:00
|
|
|
%endif
|
2014-03-02 23:05:09 +00:00
|
|
|
Requires: xCAT-server
|
|
|
|
#Requires: xCAT-server >= %{epoch}:%(cat Version|cut -d. -f 1,2)
|
|
|
|
|
2014-06-02 13:44:02 +00:00
|
|
|
# perl-ExtUtils-MakeMaker, perl-CPAN, perl-Test-Harness are only available in rhel.
|
|
|
|
# When this rpm supports being installed in sles, need to add these to xcat-dep.
|
|
|
|
# perl-SOAP-Lite is already in xcat-dep
|
2014-05-28 14:21:43 +00:00
|
|
|
Requires: perl-ExtUtils-MakeMaker perl-CPAN perl-Test-Harness perl-SOAP-Lite
|
|
|
|
|
2014-03-02 23:05:09 +00:00
|
|
|
Provides: xCAT-SoftLayer = %{epoch}:%{version}
|
|
|
|
|
|
|
|
%description
|
|
|
|
xCAT-SoftLayer provides Utilities to make xCAT work in a SoftLayer environment. This package should be installed on your management server
|
|
|
|
|
|
|
|
# %define VERBOSE %(if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ];then echo 1; else echo 0; fi)
|
|
|
|
# %define NOVERBOSE %(if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ];then echo 0; else echo 1; fi)
|
|
|
|
# %define NOVERBOSE %{?VERBOSE:1}%{!?VERBOSE:0}
|
|
|
|
|
|
|
|
%prep
|
|
|
|
# %if %NOVERBOSE
|
|
|
|
# echo NOVERBOSE is on
|
|
|
|
# set +x
|
|
|
|
# %elseif
|
|
|
|
# set -x
|
|
|
|
# %endif
|
|
|
|
|
|
|
|
%setup -q -n xCAT-SoftLayer
|
|
|
|
%build
|
|
|
|
# Convert pods to man pages and html pages
|
|
|
|
./xpod2man
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/bin
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/install
|
2014-06-02 13:44:02 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/postscripts
|
2014-03-02 23:33:13 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-SoftLayer
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man1
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man1
|
2014-04-26 22:29:01 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/post-install
|
2014-03-02 23:05:09 +00:00
|
|
|
|
2014-03-18 19:16:55 +00:00
|
|
|
cp -p -R share/xcat/install/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/install/
|
2014-03-02 23:05:09 +00:00
|
|
|
|
|
|
|
cp -d bin/* $RPM_BUILD_ROOT/%{prefix}/bin
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/bin/*
|
|
|
|
|
2014-06-02 13:44:02 +00:00
|
|
|
cp -d postscripts/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/postscripts
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/postscripts/*
|
2014-03-02 23:05:09 +00:00
|
|
|
|
2014-04-26 22:38:26 +00:00
|
|
|
cp -d si-post-install/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/post-install
|
|
|
|
chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/post-install/*
|
2014-04-26 22:29:01 +00:00
|
|
|
|
2014-03-02 23:05:09 +00:00
|
|
|
cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-SoftLayer
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-SoftLayer/*
|
|
|
|
|
2014-03-02 23:33:13 +00:00
|
|
|
cp share/man/man1/* $RPM_BUILD_ROOT/%{prefix}/share/man/man1
|
|
|
|
chmod 444 $RPM_BUILD_ROOT/%{prefix}/share/man/man1/*
|
|
|
|
cp share/doc/man1/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man1
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man1/*
|
|
|
|
|
2014-03-02 23:05:09 +00:00
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
#%doc LICENSE.html
|
|
|
|
%{prefix}
|
2014-06-02 13:44:02 +00:00
|
|
|
|
|
|
|
%post
|
|
|
|
# We are shipping the postscripts in a sysclone dir and then copying them to /install/postscripts here,
|
|
|
|
# because we want to allow base xcat to eventually ship them and not conflict on the file name/path
|
2014-06-24 20:39:05 +00:00
|
|
|
# But base xcat now has a newer/better configbond written in bash, so if that is there do not overwrite it.
|
|
|
|
head /install/postscripts/configbond | grep -q -E '^#! */bin/bash'
|
|
|
|
if [[ $? != 0 ]]; then
|
|
|
|
# the new configbond from xcat 2.8.5 is not there, so copy ours
|
|
|
|
cp -f /%{prefix}/share/xcat/sysclone/postscripts/* /install/postscripts
|
|
|
|
fi
|