Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 8daa91b24007ba1df1c609aa36474838 > files > 5

matahari-0.4.1-2.fc14.src.rpm

%global specversion 2
%global upstream_hash 598a300
%global upstream_version 0.4.1

# Keep around for when/if required
#global alphatag %{upstream_hash}.git

%global mh_release %{?alphatag:0.}%{specversion}%{?alphatag:.%{alphatag}}%{?dist}

Name:		matahari
Version:	0.4.1
Release:	%{mh_release}
Summary:	Matahari QMF Agents for Linux guests

Group:		Applications/System
License:	GPLv2
URL:		http://github.com/matahari/matahari/wiki

# wget --no-check-certificate -O matahari-matahari-{upstream_version}.tgz https://github.com/matahari/matahari/tarball/v{upstream_version}
Source0:	matahari-matahari-%{upstream_version}.tgz
Patch3:		matahari-no-qpidd.patch
Patch4:		matahari-lsb.patch
Patch5:		matahari-qmf-lib.patch

BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires:	qmf > 0.7

BuildRequires:	cmake
BuildRequires:	gcc-c++
BuildRequires:	dbus-devel
BuildRequires:	qpid-cpp-client-devel > 0.7
BuildRequires:	qmf-devel > 0.7
BuildRequires:	pcre-devel
BuildRequires:	glib2-devel
BuildRequires:	sigar-devel

%description

Matahari provides QMF Agents that can be used to control and manage
various pieces of functionality, using the AMQP protocol.

The Advanced Message Queuing Protocol (AMQP) is an open standard application
layer protocol providing reliable transport of messages.

QMF provides a modeling framework layer on top of qpid (which implements
AMQP).  This interface allows you to manage a host and its various components
as a set of objects with properties and methods.

%package broker
License:	GPLv2+
Summary:	Optional AMQP Broker for Matahari
Group:		Applications/System
Requires:	%{name} = %{version}-%{release}
Requires:	qpid-cpp-server > 0.7
Requires:	qpid-cpp-server-ssl > 0.7
Requires:	qmf > 0.7

%description broker
Optional AMQP Broker for Matahari

%package lib
License:	GPLv2+
Summary:	C libraries used by Matahari agents
Group:		Applications/System

%description lib
C libraries used by Matahari agents

%package agent-lib
License:	GPLv2+
Summary:	C++ library used by Matahari agents
Group:		Applications/System
Requires:	%{name}-lib = %{version}-%{release}
Requires:	qpid-cpp-client-ssl > 0.7

%description agent-lib
C++ library containing the base class for Matahari agents

%package host
License:	GPLv2+
Summary:	QMF agent for remote hosts
Group:		Applications/System
Requires:	%{name}-lib = %{version}-%{release}
Requires:	%{name}-agent-lib = %{version}-%{release}

%description host
QMF agent for viewing and controlling remote hosts

%package net
License:	GPLv2+
Summary:	QMF agent for network devices  
Group:		Applications/System
Requires:	%{name}-lib = %{version}-%{release}
Requires:	%{name}-agent-lib = %{version}-%{release}

%description net
QMF agent for viewing and controlling network devices  

%package service
License:	GPLv2+
Summary:	QMF agent for system services
Group:		Applications/System
Requires:	%{name}-lib = %{version}-%{release}
Requires:	%{name}-agent-lib = %{version}-%{release}

%description service
QMF agent for viewing and controlling system services

%package devel
License:	GPLv2+
Summary:	Matahari development package
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-lib = %{version}-%{release}
Requires:	%{name}-agent-lib = %{version}-%{release}
Requires:	qpid-cpp-client-devel > 0.7
Requires:	qmf-devel > 0.7
Requires:	glib2-devel

%description devel
Headers and shared libraries for developing Matahari agents.

%prep
%setup -q -n matahari-matahari-%{upstream_hash}
%patch3 -p1
%patch4 -p1
%patch5 -p1

%build
%{cmake} -DCMAKE_BUILD_TYPE=RelWithDebInfo .
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install

%{__install} -d $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
%{__install} matahari.init   $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-net
%{__install} matahari.init   $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-host
%{__install} matahari.init   $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-service
%{__install} matahari-broker $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-broker

%{__install} -d $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/
%{__install} matahari.sysconf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/matahari
%{__install} matahari-broker.sysconf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/matahari-broker
%{__ln_s} qpidd $RPM_BUILD_ROOT/%{_sbindir}/matahari-brokerd

%{__install} -d -m0755 %{buildroot}%{_localstatedir}/lib/%{name}
%{__install} -d -m0755 %{buildroot}%{_localstatedir}/run/%{name}

%post -n matahari-lib -p /sbin/ldconfig
%postun -n matahari-lib -p /sbin/ldconfig

%post -n matahari-agent-lib -p /sbin/ldconfig
%postun -n matahari-agent-lib
# Can't use -p, gives: '/sbin/ldconfig: relative path `0' used to build cache' error
/sbin/ldconfig

#== Host

%post host
/sbin/service matahari-host condrestart

%preun host
if [ $1 = 0 ]; then
   /sbin/service matahari-host stop >/dev/null 2>&1 || :
   chkconfig --del matahari-host
fi

%postun host
if [ "$1" -ge "1" ]; then
    /sbin/service matahari-host condrestart >/dev/null 2>&1 || :
fi

#== Network

%post net
/sbin/service matahari-net condrestart

%preun net
if [ $1 = 0 ]; then
   /sbin/service matahari-net stop >/dev/null 2>&1 || :
   chkconfig --del matahari-net
fi

%postun net
if [ "$1" -ge "1" ]; then
    /sbin/service matahari-net condrestart >/dev/null 2>&1 || :
fi

#== Services

%post service
/sbin/service matahari-service condrestart

%preun service
if [ $1 = 0 ]; then
   /sbin/service matahari-service stop >/dev/null 2>&1 || :
   chkconfig --del matahari-service
fi

%postun service
if [ "$1" -ge "1" ]; then
    /sbin/service matahari-service condrestart >/dev/null 2>&1 || :
fi

#== Broker

%post broker
/sbin/service matahari-broker condrestart


%preun broker
if [ $1 = 0 ]; then
    /sbin/service matahari-broker stop >/dev/null 2>&1 || :
    chkconfig --del matahari-broker
fi

%postun broker
if [ "$1" -ge "1" ]; then
    /sbin/service matahari-broker condrestart >/dev/null 2>&1 || :
fi

%clean
test "x%{buildroot}" != "x" && rm -rf %{buildroot}

%files
%defattr(644, root, root, 755)
%doc AUTHORS COPYING

%files agent-lib
%defattr(644, root, root, 755)
%{_libdir}/libmqmfagent.so.*
%dir %{_datadir}/matahari/
%config(noreplace) %{_sysconfdir}/sysconfig/matahari
%doc AUTHORS COPYING

%files lib
%defattr(644, root, root, 755)
%{_libdir}/libmcommon.so.*
%{_libdir}/libmhost.so.*
%{_libdir}/libmnet.so.*
%{_libdir}/libmsrv.so.*
%doc AUTHORS COPYING

%files net
%defattr(644, root, root, 755)
%attr(755, root, root) %{_initddir}/matahari-net
%attr(755, root, root) %{_sbindir}/matahari-netd
%doc AUTHORS COPYING

%files host
%defattr(644, root, root, 755)
%attr(755, root, root) %{_initddir}/matahari-host
%attr(755, root, root) %{_sbindir}/matahari-hostd
%doc AUTHORS COPYING

%files service
%defattr(644, root, root, 755)
%attr(755, root, root) %{_initddir}/matahari-service
%attr(755, root, root) %{_sbindir}/matahari-serviced
%doc AUTHORS COPYING

%files broker
%defattr(644, root, root, 755)
%attr(755, root, root) %{_initddir}/matahari-broker
%config(noreplace) %{_sysconfdir}/sysconfig/matahari-broker
%config(noreplace) %{_sysconfdir}/matahari-broker.conf
%{_sbindir}/matahari-brokerd

%attr(755, qpidd, qpidd) %{_localstatedir}/lib/%{name}
%attr(755, qpidd, qpidd) %{_localstatedir}/run/%{name}
%doc AUTHORS COPYING

%files devel
%defattr(644, root, root, 755)
%{_datadir}/matahari/schema.xml
%{_includedir}/matahari.h
%{_libdir}/libm*.so
%doc AUTHORS COPYING

%changelog
* Tue May 3  2011 Andrew Beekhof <andrew@beekhof.net> 0.4.1-2
- Rebuild for new qpid-cpp

* Wed Apr 27 2011 Andrew Beekhof <andrew@beekhof.net> 0.4.1-1
- New upstream relase
- New package structure
- Remove stale dependancy on hal
- Do not start services by default

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-0.1.8003b6c.git.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Jan 31 2011 Andrew Beekhof <andrew@beekhof.net> - 0.4.0-0.1.8003b6c.git
- Improved modular agent design
- Cross-platform (see mingw32-matahari)
- Added Networking and Services (supporting LSB and OCF scripts) agents

* Wed Sep 29 2010 jkeating - 0.0.5-4
- Rebuilt for gcc bug 634757

* Mon Sep 20 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 0.0.5-3
- fix header and compiler issues in code which were preventing build

* Mon Aug 16 2010 Darryl L. Pierce <dpierce@redhat.com> - 0.0.5-2
- Rebuild for updated Qpid/WMF.

* Wed Jul  7 2010 Darryl L. Pierce <dpierce@redhat.com> - 0.0.5-1
- Rebuild for updated Qpid/QMF.
- Resolves: rhbz602975 - Matahari messages are not accepted by current version of qpid in F13

* Thu Oct 08 2009 Arjun Roy <arroy@redhat.com> - 0.0.4-7
- Refactored for new version of qpidc.

* Fri Oct 02 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 0.0.4-6
- Rebuild for new qpidc.

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Jul 16 2009 Arjun Roy <arroy@redhat.com> - 0.0.4-4
- Changed buildroot value to meet fedora packaging guidelines
- Updated project website

* Mon Jul 13 2009 Arjun Roy <arroy@redhat.com> - 0.0.4-3
- Quietened rpmlint errors and warnings.
- Fixed most gcc warnings.
- Changed init script so it doesn't run by default
- Now rpm specfile makes it so service runs by default instead

* Thu Jul 9 2009 Arjun Roy <arroy@redhat.com> - 0.0.4-2
- Bumped qpidc and qmf version requirements to 0.5.790661.

* Thu Jul 9 2009 Arjun Roy <arroy@redhat.com> - 0.0.4-1
- Removed dependency on boost. Added dependency on pcre.

* Thu Jul 2 2009 Arjun Roy <arroy@redhat.com> - 0.0.3-2
- Fixed bug with not publishing host hypervisor and arch to broker
- Updated aclocal.m4 to match new version of automake

* Tue Jun 30 2009 Arjun Roy <arroy@redhat.com> - 0.0.3-1
- Added getopt and daemonize support
- Added sysV init script support

* Mon Jun 29 2009 Arjun Roy <arroy@redhat.com> - 0.0.2-1
- Now tracks hypervisor and arch using libvirt

* Tue Jun 23 2009 Arjun Roy <arroy@redhat.com> - 0.0.1-1
- Initial rpmspec packaging