Move iso-making code from spec to Makefile
[ovirt-node-image.git] / ovirt-node-image.spec.in
blob6fb968f3f409e0d114fb5e5482749337bb6578e8
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 License: GPLv2+
7 Group: Applications/System
8 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
9 URL: http://ovirt.org/
10 BuildRequires: livecd-tools >= 017.1-2ovirt
11 BuildRequires: syslinux
12 BuildRequires: appliance-tools >= 002-3
14 %define app_root %{_datadir}/%{name}
15 %define tftpboot %{_var}/lib/tftpboot
17 # disable debuginfo, makes no sense for boot image and it is created empty anyway
18 %define debug_package %{nil}
20 %description
21 The ISO boot image for oVirt Node booting from CDROM device.
22 At the moment, this RPM just packages prebuilt ISO.
24 %package pxe
25 Summary: oVirt Node PXE image
26 Group: Applications/System
28 %description pxe
29 The PXE boot image for oVirt Node network boot from oVirt Server.
31 %prep
32 %setup -q
33 ./configure
35 %build
36 make ovirt-node-image.iso
37 sudo su - -c "cd $(pwd) && ./ovirt-pxe %{name}.iso"
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 %{name}.iso %{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.