ocaml-libvirt/ocaml-libvirt.spec

328 lines
8.3 KiB
RPMSpec
Raw Normal View History

2007-08-24 16:35:28 +00:00
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil}
# Select what subpackages to build.
%define build_mlvirsh 1
%define build_virt_ctrl 1
2007-08-24 16:35:28 +00:00
%define build_virt_top 1
%define build_virt_df 1
2007-08-24 16:35:28 +00:00
%define build_full_featured_virt_top 1
Name: ocaml-libvirt
Version: 0.4.1.1
Release: 1%{?dist}
2007-08-24 16:35:28 +00:00
Summary: OCaml binding for libvirt
Group: Development/Libraries
License: LGPLv2+
URL: http://libvirt.org/ocaml/
Source0: http://libvirt.org/sources/ocaml/%{name}-%{version}.tar.gz
2007-08-24 16:35:28 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ocaml >= 3.10.1
2007-08-24 16:35:28 +00:00
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-findlib-devel
%if %build_virt_ctrl
BuildRequires: ocaml-lablgtk-devel >= 2.10.0
2008-02-13 10:20:16 +00:00
BuildRequires: gtk2-devel
BuildRequires: gnome-icon-theme
BuildRequires: ocaml-dbus-devel >= 0.06
BuildRequires: dbus-devel
2007-08-24 16:35:28 +00:00
%endif
2007-08-24 16:35:28 +00:00
%if %build_virt_top
BuildRequires: ocaml-curses-devel
BuildRequires: ocaml-extlib-devel
2007-08-24 16:35:28 +00:00
%if %build_full_featured_virt_top
BuildRequires: ocaml-xml-light-devel
BuildRequires: ocaml-csv-devel
2007-10-19 15:47:01 +00:00
BuildRequires: ocaml-calendar-devel
2007-08-24 16:35:28 +00:00
%endif
%endif
2007-08-24 16:35:28 +00:00
BuildRequires: libvirt-devel >= 0.2.1
BuildRequires: perl
BuildRequires: gawk
2007-08-24 16:35:28 +00:00
%define _use_internal_dependency_generator 0
%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
%description
OCaml binding for libvirt.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%if %build_mlvirsh
%package -n mlvirsh
Summary: OCaml virsh utility
Group: Applications/Emulators
License: GPLv2+
%description -n mlvirsh
OCaml virtualization shell.
%endif
%if %build_virt_ctrl
%package -n virt-ctrl
2007-08-24 16:35:28 +00:00
Summary: OCaml virtualization graphical utility
Group: Applications/Emulators
License: GPLv2+
%description -n virt-ctrl
2007-08-24 16:35:28 +00:00
OCaml virtualization graphical utility.
%endif
%if %build_virt_top
%package -n virt-top
Summary: Utility like top(1) for displaying virtualization stats
Group: Applications/Emulators
License: GPLv2+
%description -n virt-top
virt-top is a 'top(1)'-like utility for showing stats of virtualized
domains. Many keys and command line options are the same as for
ordinary 'top'.
It uses libvirt so it is capable of showing stats across a variety of
different virtualization systems.
%endif
%if %build_virt_df
%package -n virt-df
Summary: Utility like df(1) for displaying disk space in guests
Group: Applications/Emulators
License: GPLv2+
%description -n virt-df
virt-df is a 'df(1)'-like utility for display disk space in guests.
It uses libvirt so it is capable of showing stats across a variety of
different virtualization systems.
%endif
2007-08-24 16:35:28 +00:00
%prep
%setup -q
%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --libdir=%{_libdir} --prefix=%{_prefix}
2007-08-24 16:35:28 +00:00
make all doc
%if %opt
make opt
strip libvirt/dllmllibvirt.so
%if %build_mlvirsh
strip mlvirsh/mlvirsh.opt
%endif
%if %build_virt_ctrl
strip virt-ctrl/virt-ctrl.opt
2007-08-24 16:35:28 +00:00
%endif
%if %build_virt_top
strip virt-top/virt-top.opt
%endif
%if %build_virt_df
strip virt-df/virt-df.opt
%endif
2007-08-24 16:35:28 +00:00
%endif
%install
# These rules work if the library uses 'ocamlfind install' to install itself.
rm -rf $RPM_BUILD_ROOT
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
mkdir -p $RPM_BUILD_ROOT%{_bindir}
make install
%if %build_virt_top
# Install virt-top manpage by hand for now.
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -m 0644 virt-top/virt-top.1 $RPM_BUILD_ROOT%{_mandir}/man1
gzip $RPM_BUILD_ROOT%{_mandir}/man1/virt-top.1
%endif
%if %build_virt_df
# Install virt-df manpage by hand for now.
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -m 0644 virt-df/virt-df.1 $RPM_BUILD_ROOT%{_mandir}/man1
gzip $RPM_BUILD_ROOT%{_mandir}/man1/virt-df.1
%endif
2007-08-24 16:35:28 +00:00
%if !%build_mlvirsh
rm -f $RPM_BUILD_ROOT%{_bindir}/mlvirsh
%endif
%if !%build_virt_ctrl
rm -f $RPM_BUILD_ROOT%{_bindir}/virt-ctrl
2007-08-24 16:35:28 +00:00
%endif
%if !%build_virt_top
rm -f $RPM_BUILD_ROOT%{_bindir}/virt-top
%endif
%if !%build_virt_df
rm -f $RPM_BUILD_ROOT%{_bindir}/virt-df
%endif
2007-08-24 16:35:28 +00:00
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc COPYING.LIB README ChangeLog
2007-08-24 16:35:28 +00:00
%{_libdir}/ocaml/libvirt
%if %opt
%exclude %{_libdir}/ocaml/libvirt/*.a
%exclude %{_libdir}/ocaml/libvirt/*.cmxa
%exclude %{_libdir}/ocaml/libvirt/*.cmx
%endif
%exclude %{_libdir}/ocaml/libvirt/*.mli
%{_libdir}/ocaml/stublibs/*.so
%{_libdir}/ocaml/stublibs/*.so.owner
%files devel
%defattr(-,root,root,-)
%doc COPYING.LIB README TODO.libvirt ChangeLog html/*
2007-08-24 16:35:28 +00:00
%if %opt
%{_libdir}/ocaml/libvirt/*.a
%{_libdir}/ocaml/libvirt/*.cmxa
%{_libdir}/ocaml/libvirt/*.cmx
%endif
%{_libdir}/ocaml/libvirt/*.mli
%if %build_mlvirsh
%files -n mlvirsh
%defattr(-,root,root,-)
%doc COPYING README ChangeLog
2007-08-24 16:35:28 +00:00
%{_bindir}/mlvirsh
%endif
%if %build_virt_ctrl
%files -n virt-ctrl
2007-08-24 16:35:28 +00:00
%defattr(-,root,root,-)
%doc COPYING README ChangeLog
%{_bindir}/virt-ctrl
2007-08-24 16:35:28 +00:00
%endif
%if %build_virt_top
%files -n virt-top
%defattr(-,root,root,-)
%doc COPYING README TODO.virt-top ChangeLog
2007-08-24 16:35:28 +00:00
%{_bindir}/virt-top
%{_mandir}/man1/virt-top.1.gz
2007-08-24 16:35:28 +00:00
%endif
%if %build_virt_df
%files -n virt-df
%defattr(-,root,root,-)
%doc COPYING README ChangeLog
%{_bindir}/virt-df
%{_mandir}/man1/virt-df.1.gz
%endif
2007-08-24 16:35:28 +00:00
%changelog
* Tue Mar 19 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.1.1-1
- New upstream release 0.4.1.1.
- Move configure to build section.
- Pass RPM_OPT_FLAGS.
* Tue Mar 4 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.1.0-2
- Fix source URL.
- Install virt-df manpage.
* Tue Mar 4 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.1.0-1
- New upstream release 0.4.1.0.
- Upstream now requires ocaml-dbus >= 0.06, ocaml-lablgtk >= 2.10.0,
ocaml-dbus-devel.
- Enable virt-df.
2008-03-01 10:23:04 +00:00
* Sat Mar 1 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.0.3-3
- Rebuild for ppc64.
2008-02-13 10:20:16 +00:00
* Wed Feb 13 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.0.3-2
- Add BR gtk2-devel
* Tue Feb 12 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.0.3-1
- New upstream version 0.4.0.3.
- Rebuild for OCaml 3.10.1.
* Tue Nov 20 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.3.4-1
- New upstream release 0.3.3.4.
- Upstream website is now http://libvirt.org/ocaml/
2007-10-19 15:47:01 +00:00
* Fri Oct 19 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.3.0-2
- Mistake: BR is ocaml-calendar-devel.
* Fri Oct 19 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.3.0-1
- New upstream release 0.3.3.0.
- Added support for virt-df, but disabled it by default.
- +BR ocaml-calendar.
2007-09-24 15:28:53 +00:00
* Mon Sep 24 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.8-1
- New upstream release 0.3.2.8.
* Thu Sep 20 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.7-1
- New upstream release 0.3.2.7.
- Ship the upstream ChangeLog file.
* Thu Sep 6 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.6-2
- Force dependency on ocaml >= 3.10.0-7 which has fixed requires/provides
scripts.
2007-09-06 17:24:16 +00:00
* Thu Sep 6 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.6-1
- New upstream version 0.3.2.6.
* Wed Aug 29 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.5-1
- New upstream version 0.3.2.5.
- Keep TODO out of the main package, but add (renamed) TODO.libvirt and
TODO.virt-top to the devel and virt-top packages respectively.
- Add BR gawk.
2007-08-24 18:14:50 +00:00
* Thu Aug 23 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.4-1
- New upstream version 0.3.2.4.
2007-08-24 16:35:28 +00:00
* Thu Aug 23 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.3-2
- build_* macros so we can choose what subpackages to build.
* Thu Aug 23 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.3-1
- Upstream version 0.3.2.3.
- Add missing BR libvirt-devel.
* Wed Aug 22 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.2-1
- Upstream version 0.3.2.2.
* Wed Aug 22 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.1-2
- Fix unclosed if-statement in spec file.
* Wed Aug 22 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.1-1
- Upstream version 0.3.2.1.
- Put HTML documentation in -devel package.
* Mon Aug 6 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.1.2-1
- Initial RPM release.