#include pre-built image ISO as source %{!?source_iso: %define source_iso 0} Summary: oVirt Node ISO image Name: ovirt-node-image Version: 1.0.2 Release: 0%{?dist}%{?extra_release} Source0: %{name}-%{version}.tar.gz %if %{source_iso} Source1: %{name}.iso Source2: %{name}-manifests.tar %define image_iso %{SOURCE1} %define image_manifests %{SOURCE2} %else %define image_iso %{name}.iso %define image_manifests %{name}-manifests.tar %endif License: GPLv2+ Group: Applications/System BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot URL: http://ovirt.org/ %if ! %{source_iso} BuildRequires: livecd-tools >= 020-2 BuildRequires: appliance-tools >= 003.9 %endif Requires: livecd-tools >= 020-2 %define app_root %{_datadir}/%{name} # disable debuginfo, makes no sense for boot image and it is created empty anyway %define debug_package %{nil} %description The ISO boot image for oVirt Node booting from CDROM device. At the moment, this RPM just packages prebuilt ISO. %package pxe Summary: oVirt Node PXE image Group: Applications/System Requires: %{name} = %{version}-%{release} %description pxe PXE boot image installer for oVirt Node network boot from oVirt Server. %prep %setup -q %if ! %{source_iso} ./configure %endif %build %if ! %{source_iso} make %{?ovirt_cache_dir: OVIRT_CACHE_DIR=%{ovirt_cache_dir}} \ %{?ovirt_local_repo: OVIRT_LOCAL_REPO=%{ovirt_local_repo}} \ %{?ovirt_url: OVIRT_URL=%{ovirt_url}} \ %{name}.iso %endif %install %{__rm} -rf %{buildroot} mkdir %{buildroot} %{__install} -d -m0755 %{buildroot}%{app_root} %{__install} -p -m0644 %{image_iso} %{buildroot}%{app_root} %{__install} -d -m0755 %{buildroot}%{_sbindir} %{__install} -p -m0755 create-ovirt-iso-nodes %{buildroot}%{_sbindir} %{__install} -p -m0755 edit-livecd %{buildroot}%{_sbindir} %{__install} -p -m0755 livecd-setauth %{buildroot}%{_sbindir} %{__install} -p -m0755 livecd-rpms %{buildroot}%{_sbindir} %{__tar} -xf %{image_manifests} -C %{buildroot}%{app_root} %clean %{__rm} -rf %{buildroot} %post pxe cd %{app_root} rm -rf tftpboot livecd-iso-to-pxeboot %{name}.iso > /dev/null cobbler sync > /dev/null 2>&1 || : %files %defattr(0644,root,root,0755) %{app_root}/%{name}.iso %doc %{app_root}/manifests/rpm-manifest.txt %doc %{app_root}/manifests/srpm-manifest.txt %doc %{app_root}/manifests/file-manifest.txt %doc %{app_root}/manifests/dir-manifest.txt %doc %{app_root}/manifests/rpm-manifest-post.txt %doc %{app_root}/manifests/srpm-manifest-post.txt %doc %{app_root}/manifests/file-manifest-post.txt %doc %{app_root}/manifests/dir-manifest-post.txt %doc %{app_root}/manifests/ovirt-release %defattr(0755,root,root,0755) %{_sbindir}/create-ovirt-iso-nodes %{_sbindir}/edit-livecd %{_sbindir}/livecd-setauth %{_sbindir}/livecd-rpms %files pxe %defattr(0644,root,root,0755) %changelog * Thu Jul 03 2008 Perry Myers 0.92-0 - Only store ISO in SRPM, and generate PXE from that during build * Tue Jun 03 2008 Alan Pevec 0.0.5-1 - Initial build.