build procedure change: include image ISO in SRPM
[ovirt-node-image.git] / ovirt-node-image.spec.in
blobeb177147a51e6e9d6be490aefa000e3fd3deb5cc
1 Summary: oVirt Node ISO image
2 Name: ovirt-node-image
3 Version: @VERSION@
4 Release: 0%{?dist}%{?extra_release}
5 Source0: %{name}-%{version}.tar.gz
6 Source1: %{name}.iso
7 License: GPLv2+
8 Group: Applications/System
9 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
10 URL: http://ovirt.org/
11 BuildRequires: livecd-tools >= 017.1-2ovirt
12 BuildRequires: syslinux
13 BuildRequires: appliance-tools >= 002-3
15 %define app_root %{_datadir}/%{name}
16 %define tftpboot %{_var}/lib/tftpboot
18 # disable debuginfo, makes no sense for boot image and it is created empty anyway
19 %define debug_package %{nil}
21 %description
22 The ISO boot image for oVirt Node booting from CDROM device.
23 At the moment, this RPM just packages prebuilt ISO.
25 %package pxe
26 Summary: oVirt Node PXE image
27 Group: Applications/System
29 %description pxe
30 The PXE boot image for oVirt Node network boot from oVirt Server.
32 %prep
33 %setup -q
34 ./configure
36 %build
37 sudo su - -c "cd $(pwd) && ./ovirt-pxe %{SOURCE1}"
38 sudo su - -c "cd $(pwd) && chown -R $USER ."
40 %install
41 %{__rm} -rf %{buildroot}
42 mkdir %{buildroot}
44 %{__install} -d -m0755 %{buildroot}%{tftpboot}
45 %{__install} -d -m0755 %{buildroot}%{tftpboot}/pxelinux.cfg
46 %{__install} -p -m0644 tftpboot/pxelinux.cfg/default %{buildroot}%{tftpboot}/pxelinux.cfg/default
47 %{__install} -p -m0644 tftpboot/pxelinux.0 %{buildroot}%{tftpboot}
48 %{__install} -p -m0644 tftpboot/initrd0.img %{buildroot}%{tftpboot}
49 %{__install} -p -m0644 tftpboot/vmlinuz0 %{buildroot}%{tftpboot}
50 %{__install} -d -m0755 %{buildroot}%{app_root}
51 %{__install} -p -m0644 %{SOURCE1} %{buildroot}%{app_root}
52 %{__install} -d -m0755 %{buildroot}%{_sbindir}
53 %{__install} -p -m0755 ovirt-pxe %{buildroot}%{_sbindir}
54 %{__install} -p -m0755 ovirt-flash %{buildroot}%{_sbindir}
55 %{__install} -p -m0755 ovirt-flash-static %{buildroot}%{_sbindir}
57 %clean
58 %{__rm} -rf %{buildroot}
60 %post pxe
61 cobbler sync > /dev/null 2>&1 || :
63 %files
64 %defattr(-,root,root,0644)
65 %{app_root}/%{name}.iso
66 %defattr(-,root,root,0755)
67 %{_sbindir}/ovirt-pxe
68 %{_sbindir}/ovirt-flash
69 %{_sbindir}/ovirt-flash-static
71 %files pxe
72 %defattr(-,root,root,0644)
73 %config(noreplace) %{tftpboot}/pxelinux.cfg/default
74 %{tftpboot}/pxelinux.0
75 %{tftpboot}/initrd0.img
76 %{tftpboot}/vmlinuz0
78 %changelog
79 * Thu Jul 03 2008 Perry Myers <pmyers@redhat.com> 0.92-0
80 - Only store ISO in SRPM, and generate PXE from that during build
82 * Tue Jun 03 2008 Alan Pevec <apevec@redhat.com> 0.0.5-1
83 - Initial build.