File sipxsupervisor.spec of Package sipxsupervisor

#!BuildIgnore: post-build-checks
%define release_prefix 18591.
Name:     sipxsupervisor
Version:  4.2.1
Release:  %{buildno}

Summary:  sipXecs process supervisor
License:  Pingtel Commercial License
Group:    Productivity/Telephony/SIP/Servers
Vendor:   Pingtel Corp.
Packager: Pingtel <>

BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: cppunit-devel
BuildRequires: doxygen
BuildRequires: pcre-devel >= 4.5
BuildRequires: openssl-devel
BuildRequires: unixODBC-devel
BuildRequires: net-snmp-devel >= 5.3.1
BuildRequires: sipxcommserverlib-devel >= %version
BuildRequires: sipxportlib-devel >= %version
BuildRequires: sipxtacklib-devel >= %version
BuildRequires: asciidoc

%if %{_vendor} == redhat
BuildRequires: docbook-style-xsl

%if %{_vendor} == suse
BuildRequires: docbook-xsl-stylesheets

Source:   %name-%version.tar.gz

%if %{_vendor} == redhat
Requires: chkconfig
Requires: net-snmp-libs >= 5.3.1

%if %{_vendor} == suse
Requires: net-snmp >= 5.3.1

Requires: sipxcommserverlib >= %version

# by requiring sipxpbx, that will be upgraded first so it won't object to this overriding files
Requires: sipxpbx >= %version

# sending email - an smtp listener must be running on localhost
%if %{_vendor} == redhat
Requires: smtpdaemon
%if %{_vendor} == suse
Requires: sendmail

Prefix:    %_prefix
BuildRoot: %{_tmppath}/%name-%version-root

The sipXecs project is a comprehensive small/medium scale Enterprise SIP PBX.

This component manages sipXecs processes and acts as the configuration agent
for a remote management application.

%if %{_vendor} == suse

%package devel
Requires: %name
Requires: net-snmp-devel >= 5.3.1
Requires: sipxcommserverlib-devel >= %version
Group: Development/Libraries
Vendor: SIPfoundry
Summary: Internal documentation for %name

%description devel
Internal class documentation for the sipXsupervisor classes

%setup -q

%configure --enable-rpmbuild  --with-distdir=../dist SIPX_PROJECTS=sipxportlib sipxtacklib sipxmedialib sipxmediaadapterlib sipxcalllib sipxcommserverlib sipxcommons sipxacd sipxbridge sipxcallcontroller sipxcdrlog sipxconfig sipxfreeswitch sipximbot sipxivr sipxopenfire sipxpage sipxpark sipxpresence sipxprovision sipxproxy sipxpublisher sipxrecording sipxregistry sipxrelay sipxrest sipxrls sipxsaa sipxsupervisor sipxtools sipxecs-doc sipxpbx sipxecs
cp config.log %name.configlog

# makeinstall RPM macro doesn't leverage DESTDIR but instead overrides
# libdir, bindir, etc just for make install. This not copesetic w/how
# our makefiles are built, they'd rather preserve libdir, and use
# DESTDIR when copying/moving/creating files.  The approach we're taking
# is quite standard, so it's surprising RPM's makeinstall macro is
# the way it is.



%doc CONTRIBUTORS README NEWS TODO ChangeLog %name.configlog

%attr(755,root,root) %{_bindir}/sipxsupervisor
%attr(755,root,root) %{_bindir}/
%attr(755,root,root) %{_bindir}/%name-config
%dir %{_datadir}/sipxecs/process.d
%attr(644,root,root) %{_datadir}/sipxecs/process.d/sipxsupervisor-process.xml

%dir %{_sysconfdir}/sipxpbx/alarms
%attr(644,root,sipxchange) %{_sysconfdir}/sipxpbx/alarms/sipXalarms-config.xml
%dir %{_datadir}/sipxecs/mibs
%attr(644,root,sipxchange) %{_datadir}/sipxecs/mibs/SIPXECS-ALARM-NOTIFICATION-MIB.mib
%dir %{_datadir}/sipxecs/alarms
%attr(644,root,sipxchange) %{_datadir}/sipxecs/alarms/alarm-strings.xml
%attr(644,root,sipxchange) %{_datadir}/sipxecs/alarms/sipXalarms-strings.xml

%attr(755,root,root) %{_datadir}/sipxecs/schema/sipXecs-process.xsd
%attr(755,root,root) %{_datadir}/sipxecs/schema/alarm.xsd
%attr(755,root,root) %{_datadir}/sipxecs/schema/alarm-group.xsd

%dir %attr(775,sipxchange,sipxchange) %{_localstatedir}/sipxdata/process-state
%dir %attr(775,sipxchange,sipxchange) %{_localstatedir}/sipxdata/process-cfgver

%files devel
%docdir %{_datadir}/doc/sipxecs/%name


rm -f %{_localstatedir}/sipxdata/tmp/processAlias.dat
rm -f %{_localstatedir}/sipxdata/tmp/locked.lck