LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File sipxportlib.spec of Package sipxportlib (Project home:sipfoundry:test)

%define release_prefix 18415.
Name:    sipxportlib
Version: 4.2.1
Release: %{buildno}

Summary:  OS Abstraction and OS Utilities library for sipXecs IP PBX from SIPfoundry
License:  LGPL
Group:    Productivity/Telephony/SIP/Servers
Vendor:   SIPfoundry
Packager: SIPfoundry <sipx-dev@list.sipfoundry.org>
Url:      http://www.sipfoundry.org
%define   lib_name sipXport

BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: cppunit-devel
BuildRequires: doxygen
BuildRequires: openssl-devel >= 0.9.7a
BuildRequires: pcre-devel >= 4.5
BuildRequires: findutils
BuildRequires: asciidoc

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

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

Requires: openssl >= 0.9.7a
Requires: pcre >= 4.5

Source: %name-%version.tar.gz
Source100: %name-%version-rpmlintrc

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

%description
This package is part of the sipXecs Enterprise Unified Communications Solution (IP PBX) from SIPfoundry
(http://www.sipfoundry.org). Install the toplevel RPM called 'sipxecs' to install the entire system.
After installation run the script 'sipxecs-setup' to initialize.

sipXportlib provides a set of classes that provide an operating
system abstraction from a majority of OS provided functions. All of
the sipXecs projects use this library to ensure easy porting to any
operating system. The library currently provides classes that
encapsulate functions and operations for:

  * Threads
  * Locks and Mutexes
  * Semaphores
  * Messages and Queues
  * Timers
  * Time and Date
  * Sockets
  * File and Directory
  * Operating System Processes
  * Dynamic loading of shared libraries and symbols

%if %{_vendor} == suse
%debug_package
%endif

# Install header files
%package devel
Requires: openssl-devel >= 0.9.7a
Requires: pcre-devel
Requires: %name
Group: Development/Libraries
Vendor: SIPfoundry
Summary: Header files for %name 

%description devel
This library is part of the sipXecs IP PBX project from SIPfoundry.
It provides a set of classes that provide an operating
system abstraction from a majority of OS provided functions. All of
the sipXecs projects use this library to ensure easy porting to any
operating system. The library currently provides classes that
encapsulate functions and operations for:

  * Threads
  * Locks and Mutexes
  * Semaphores
  * Messages and Queues
  * Timers
  * Time and Date
  * Sockets
  * File and Directory
  * Operating System Processes
  * Dynamic loading of shared libraries and symbols

This package contains the necessary header files and static libraries
helpful to build projects from the sipXecs library


%prep
%setup -q

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

%install

# 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.
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

%clean
# Do Not Clean - when we are building a set of sipX RPMs, we need the 
#                dependencies to be here.
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc CONTRIBUTORS README NEWS TODO ChangeLog %name.configlog
%attr(755,root,root) %{_bindir}/syslogviewer
%attr(755,root,root) %{_bindir}/sipx-upgrade
%attr(755,root,root) %{_bindir}/sipx-config
%attr(755,root,root) %{_bindir}/%name-config
%if %{_vendor} == redhat
%attr(755,root,root) %{_libdir}/libsipXport.so.*
%endif
%if %{_vendor} == suse
%attr(755,root,root) %{_libdir}/libsipXport.so.*
%endif

%files devel
%defattr(644,root,root,755)
%docdir doc
%dir %attr(755,root,root) %{_datadir}/doc/sipxecs
%docdir %{_datadir}/doc/sipxecs/%name
%{_datadir}/doc/sipxecs/%name

%{_libdir}/libsipXunit.la
%{_libdir}/libsipXunit.a
%{_libdir}/libsipXport.la
%{_libdir}/libsipXport.a
%{_libdir}/libsipXport.so

%dir %attr(755,root,root) %{_includedir}/os
%dir %attr(755,root,root) %{_includedir}/utl
%dir %attr(755,root,root) %{_includedir}/xmlparser
%dir %attr(755,root,root) %{_includedir}/sipxunit

%{_includedir}/os/*
%{_includedir}/utl/*
%{_includedir}/xmlparser/*
%{_includedir}/sipxunit/*

%post
# Correct the group of any sipXecs file that has group 4294967295.
# (Actually, it will catch any file with a group number that is
# not in /etc/group.)
# This is done here in sipXportLib so it completes before the
# components that call pkg-upgrade are installed, to avoid the
# bug in pkg-upgrade triggered by such files.
# Suppress error output, as all good RPM scriptlets should produce no
# output at all.
#( find %{_sysconfdir}/sipxpbx \
#	%{_localstatedir}/sipxdata/sipdb \
#	%{_localstatedir}/log/sipxpbx \
#	%{_localstatedir}/sipxdata/mediaserver/data \
#	%{_datadir}/www/cgi-bin/replication \
#    -nogroup | 
#         xargs chgrp sipxchange
#  # Ensure a success exit value, as the preceding 'find' may have found
#  # no files.
##  true
#) 2>/dev/null || :

%changelog