unblacklist terminfo
[ovirt-node-image.git] / ovirt-node-image.spec.in
blobf6429a660b11643fa72e138fffa500d5d5610e5a
1 #include pre-built image ISO as source
2 %{!?source_iso: %define source_iso 0}
4 Summary: oVirt Node ISO image
5 Name: ovirt-node-image
6 Version: @VERSION@
7 Release: 0%{?dist}%{?extra_release}
8 Source0: %{name}-%{version}.tar.gz
9 %if %{source_iso}
10 Source1: %{name}.iso
11 %define image_iso %{SOURCE1}
12 %else
13 %define image_iso %{name}.iso
14 %endif
15 License: GPLv2+
16 Group: Applications/System
17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
18 URL: http://ovirt.org/
19 BuildRequires: livecd-tools >= 020-2
20 BuildRequires: syslinux
21 Requires: appliance-tools >= 003.9
23 %define app_root %{_datadir}/%{name}
25 # disable debuginfo, makes no sense for boot image and it is created empty anyway
26 %define debug_package %{nil}
28 %description
29 The ISO boot image for oVirt Node booting from CDROM device.
30 At the moment, this RPM just packages prebuilt ISO.
32 %package pxe
33 Summary: oVirt Node PXE image
34 Group: Applications/System
35 Requires: %{name} = %{version}-%{release}
37 %description pxe
38 PXE boot image installer for oVirt Node network boot from oVirt Server.
40 %prep
41 %setup -q
42 %if ! %{source_iso}
43 ./configure
44 %endif
46 %build
47 %if ! %{source_iso}
48 make %{?ovirt_cache_dir: OVIRT_CACHE_DIR=%{ovirt_cache_dir}} \
49 %{?ovirt_local_repo: OVIRT_LOCAL_REPO=%{ovirt_local_repo}} \
50 %{?ovirt_url: OVIRT_URL=%{ovirt_url}} \
51 %{name}.iso
52 %endif
54 %install
55 %{__rm} -rf %{buildroot}
56 mkdir %{buildroot}
58 %{__install} -d -m0755 %{buildroot}%{app_root}
59 %{__install} -p -m0644 %{image_iso} %{buildroot}%{app_root}
60 %{__install} -d -m0755 %{buildroot}%{_sbindir}
61 %{__install} -p -m0755 ovirt-pxe %{buildroot}%{_sbindir}
62 %{__install} -p -m0755 ovirt-flash %{buildroot}%{_sbindir}
63 %{__install} -p -m0755 create-ovirt-iso-nodes %{buildroot}%{_sbindir}
64 %{__install} -p -m0755 edit-livecd %{buildroot}%{_sbindir}
65 %{__install} -p -m0755 livecd-setauth %{buildroot}%{_sbindir}
67 %clean
68 %{__rm} -rf %{buildroot}
70 %post pxe
71 cd %{app_root}
72 rm -rf tftpboot
73 ovirt-pxe %{name}.iso > /dev/null
74 cobbler sync > /dev/null 2>&1 || :
76 %files
77 %defattr(-,root,root,0644)
78 %{app_root}/%{name}.iso
79 %defattr(-,root,root,0755)
80 %{_sbindir}/ovirt-pxe
81 %{_sbindir}/ovirt-flash
82 %{_sbindir}/create-ovirt-iso-nodes
83 %{_sbindir}/edit-livecd
84 %{_sbindir}/livecd-setauth
86 %files pxe
87 %defattr(0644,root,root,0755)
89 %changelog
90 * Thu Jul 03 2008 Perry Myers <pmyers@redhat.com> 0.92-0
91 - Only store ISO in SRPM, and generate PXE from that during build
93 * Tue Jun 03 2008 Alan Pevec <apevec@redhat.com> 0.0.5-1
94 - Initial build.