2007-01-01 19:25:25 +01:00
#
# Pandora Agents
#
%define name pandora_agents
%define version 1.2.0
2007-01-02 12:32:02 +01:00
Summary: Pandora Agents
2007-01-01 19:25:25 +01:00
Name: %{name}
Version: %{version}
Release: 1
License: GPL
Vendor: Sancho Lerena <sancho.lerena@artica.es>
Source0: %{name}-%{version}.tar.gz
URL: http://pandora.sf.net
2007-01-08 10:05:32 +01:00
Group: System/Monitoring
2007-01-01 19:25:25 +01:00
Packager: Manuel Arostegui <marostegui@artica.es>
Prefix: /opt
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
BuildArchitectures: noarch
2007-02-02 13:37:08 +01:00
Requires: coreutils
2007-01-01 19:25:25 +01:00
AutoReq: 0
Provides: %{name}-%{version}
%description
2007-01-03 19:47:54 +01:00
Pandora agents are based on native languages in every platform: scripts that can be written in any language. It’ s possible to reproduce any agent in any programming language and can be extended without difficulty the existing ones in order to cover aspects not taken into account up to the moment.
These scripts are formed by modules that each one gathers a "chunk" of information. Thus, every agent gathers several "chunks" of information; this one is organized in a data set and stored in a single file, called data file.
2007-01-01 19:25:25 +01:00
%prep
#rm -rf $RPM_BUILD_ROOT
%setup -q -n linux
%build
%install
rm -rf $RPM_BUILD_ROOT
2007-02-02 13:37:08 +01:00
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_agent/
2007-01-01 19:25:25 +01:00
mkdir -p $RPM_BUILD_ROOT/usr/
mkdir -p $RPM_BUILD_ROOT/usr/share/
mkdir -p $RPM_BUILD_ROOT/usr/share/man
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
2007-01-02 12:32:02 +01:00
mkdir -p $RPM_BUILD_ROOT/usr/
mkdir -p $RPM_BUILD_ROOT/usr/bin/
mkdir -p $RPM_BUILD_ROOT/etc/
mkdir -p $RPM_BUILD_ROOT/etc/pandora/
mkdir -p $RPM_BUILD_ROOT/usr/local/etc/pandora/temp
mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/
mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_out
mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
2007-02-02 13:37:08 +01:00
cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/
mv $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent.sh $RPM_BUILD_ROOT/usr/bin/pandora_agent
mv $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/usr/bin/pandora_agent_daemon
2007-01-01 19:25:25 +01:00
cp pandora.1 $RPM_BUILD_ROOT/usr/share/man/man1/
cp pandora_agents.1 $RPM_BUILD_ROOT/usr/share/man/man1/
if [ -f $RPM_BUILD_ROOT%{prefix}/%{name}-%{version}-%{release}/%{name}.spec ] ; then
rm $RPM_BUILD_ROOT%{prefix}/%{name}-%{version}-%{release}/%{name}.spec
fi
%clean
rm -rf $RPM_BUILD_ROOT
%post
2007-01-02 12:32:02 +01:00
echo "Pandora Agent has been place under /usr/bin/"
echo "Pandora Agent configuration file is /etc/pandora/pandora_agent.conf"
2007-02-02 13:37:08 +01:00
mkdir -p /etc/pandora
ln -s /opt/pandora_agent/pandora_agent.conf /etc/pandora/pandora_agent.conf
ln -s /opt/pandora_agent/pandora_user.conf /etc/pandora/pandora_user.conf
2007-01-01 19:25:25 +01:00
%files
2007-01-02 12:32:02 +01:00
%defattr(700,pandora,pandora)
/usr/bin/pandora_agent_daemon
/usr/bin/pandora_agent
%defattr(600,pandora,pandora)
/var/log/pandora/
/var/spool/pandora/
%defattr(755,pandora,pandora)
2007-02-02 13:37:08 +01:00
%docdir %{prefix}/pandora_agents/docs
%{prefix}/pandora_agent
2007-01-01 19:25:25 +01:00
%{_mandir}/man1/pandora.1.gz
%{_mandir}/man1/pandora_agents.1.gz