2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-28 20:39:40 +00:00
confluent/confluent_osdeploy/confluent_osdeploy.spec.tmpl

80 lines
1.8 KiB
Cheetah
Raw Normal View History

2020-05-04 19:53:29 +00:00
Name: confluent_osdeploy-x86_64
Version: #VERSION#
2020-05-04 19:25:04 +00:00
Release: 1
Summary: OS Deployment support for confluent
License: Apache2
URL: http://hpc.lenovo.com/
2020-05-04 19:53:29 +00:00
Source0: confluent_osdeploy.tar.xz
2020-05-04 19:25:04 +00:00
BuildArch: noarch
%define is_rh 0%{?el6:1}%{?el7:1}%{?el8:1}
%if %is_rh
Requires: confluent_ipxe mtools httpd mod_ssl
%else
Requires: confluent_ipxe mtools apache2
%endif
BuildRoot: /tmp
%description
This contains support utilities for enabling deployment of x86_64 architecture systems
%define debug_package %{nil}
%prep
%setup -n confluent_osdeploy
%build
mkdir -p opt/confluent/bin
cd utils
make all
cp copernicus clortho autocons ../opt/confluent/bin
cd ..
2020-06-18 16:49:05 +00:00
for os in rhvh4 el8 suse15 ubuntu20.04; do
2020-05-04 19:25:04 +00:00
mkdir ${os}out
cd ${os}out
cp -a ../opt .
2020-05-04 19:55:22 +00:00
cp -a ../${os}/initramfs/* .
cp -a ../common/* .
find . | cpio -H newc -o > ../addons.cpio
mv ../addons.cpio .
2020-05-04 19:25:04 +00:00
cd ..
done
2020-06-09 12:50:54 +00:00
mkdir esxi7out
2020-06-08 21:24:48 +00:00
cd esxi7out
2020-06-09 13:51:48 +00:00
cp -a ../opt .
cp -a ../esxi7/initramfs/* .
cp -a ../common/* .
2020-06-09 20:12:22 +00:00
chmod +x bin/* opt/confluent/bin/*
tar zcvf ../addons.tgz *
mv ../addons.tgz .
2020-06-08 21:24:48 +00:00
cd ..
2020-06-11 21:18:28 +00:00
cp -a esxi7out esxi6out
cp -a esxi7 esxi6
%install
2020-06-18 16:49:05 +00:00
for os in rhvh4 el8 suse15 ubuntu20.04 esxi6 esxi7; do
2020-05-04 19:25:04 +00:00
mkdir -p %{buildroot}/opt/confluent/lib/osdeploy/$os/initramfs
mkdir -p %{buildroot}/opt/confluent/lib/osdeploy/$os/profiles
2020-06-08 21:24:48 +00:00
cp ${os}out/addons.* %{buildroot}/opt/confluent/lib/osdeploy/$os/initramfs
cp -a $os/profiles/* %{buildroot}/opt/confluent/lib/osdeploy/$os/profiles
2020-05-04 19:25:04 +00:00
done
%if %is_rh
mkdir -p %{buildroot}/etc/httpd/conf.d
mv confluent-osdeploy.conf %{buildroot}/etc/httpd/conf.d/
%else
mkdir -p %{buildroot}/etc/apache2/conf.d
mv confluent-osdeploy.conf.sles %{buildroot}/etc/apache2/conf.d/confluent-osdeploy.conf
%endif
2020-05-04 19:25:04 +00:00
%files
/opt/confluent/lib/osdeploy
%if %is_rh
/etc/httpd/conf.d/confluent-osdeploy.conf
%else
/etc/apache2/conf.d/confluent-osdeploy.conf
%endif