Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7d6cfb6bd9
Fetching contributors…

Cannot retrieve contributors at this time

244 lines (208 sloc) 8.214 kb
#!BuildIgnore: post-build-checks
Name: @PACKAGE@
Version: @VERSION@
Release: @PACKAGE_REVISION@
Summary: SIP PBX
License: Pingtel Commercial License
Group: Productivity/Telephony/SIP/Servers
Vendor: Pingtel Corp.
Packager: Pingtel <support@pingtel.com>
Url: http://www.pingtel.com
BuildRequires: gettext
BuildRequires: java-devel >= 1.6
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: cppunit-devel
BuildRequires: doxygen
BuildRequires: pcre-devel >= 4.5
BuildRequires: python
BuildRequires: sipxcalllib-devel >= %version
BuildRequires: sipxcommserverlib-devel >= %version
BuildRequires: sipxmediaadapterlib-devel >= %version
BuildRequires: sipxmedialib-devel >= %version
BuildRequires: sipxportlib-devel >= %version
BuildRequires: sipxtacklib-devel >= %version
%if %{_vendor} == redhat
BuildRequires: httpd-devel >= 2.0.46
%endif
%if %{_vendor} == suse
BuildRequires: apache2-devel
%endif
Source: %name-%version.tar.gz
Obsoletes: %name-devel
Requires: alsa-utils
Requires: expat >= 1.95
%if %{_vendor} == redhat
Requires: httpd >= 2.0.46
%endif
%if %{_vendor} == suse
Requires: apache2-prefork
%endif
Requires: bind >= 9.3.4
%if %{_vendor} == redhat
Requires: mod_ssl
Requires: chkconfig
%endif
Requires: sipxcalllib >= %version
Requires: sipxcommserverlib >= %version
Requires: sipxtools >= %version
Requires: httpd >= 2.0
Requires: rsyslog
# sipx-snapshot uses gdb to get backtraces and simulated core files
# from sipXecs processes.
Requires: gdb
%if %{_vendor} == redhat
Requires: glibc-common
%endif
# for the time being, dns caching server is required.
Requires: bind
# there is a reference to ntp in startup script, otherwise just good practice
Requires: ntp
# sending email - an smtp listener must be running on localhost
%if %{_vendor} == redhat
Requires: smtpdaemon
%endif
%if %{_vendor} == suse
Requires: sendmail
%endif
# Required for inclusion of Python's Snack module.
%if %{_vendor} == redhat
#fedora/rhel6/centos6 test
%if 0%{?fedora} >= 6 || 0%{?rhel} >= 6
Requires: newt-python
%else
# centos5 has python support built into newt package. later distros separated it out
Requires: newt
%endif
%endif
%if %{_vendor} == suse
Requires: python-newt
%endif
Prefix: %_prefix
BuildRoot: %{_tmppath}/%name-%version-root
%description
The sipXpbx project is a comprehensive small/medium scale Enterprise SIP PBX. It combines:
* Call routing sipXproxy
* sipXregistry registry/redirect server,
* the subscribe/notify framework and message waiting indication package from sipXpublisher,
* Media Server sipXvxml with auto-attendant and voice mail applications,
* PBX and phone configuration support from sipXconfig.
%if %{_vendor} == suse
%debug_package
%endif
%prep
%setup -q
%build
%configure --enable-rpmbuild @SIPX_RPM_CONFIGURE_OPTIONS@
cp config.log %name.configlog
make
%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
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc README ChangeLog %name.configlog
%attr(755,root,root) %{_bindir}/analyze_483s
%attr(755,root,root) %{_bindir}/ipcclean.pl
%attr(755,root,root) %{_bindir}/check-fqdn
%attr(755,root,root) %{_bindir}/sipx-snapshot
%attr(755,root,root) %{_bindir}/sipx-backup
%attr(755,root,root) %{_bindir}/sipx-restore
%attr(755,root,root) %{_bindir}/sipxecs-upgrade
%attr(755,root,root) %{_bindir}/sipxecs-pgcdraccess
%attr(755,root,root) %{_bindir}/sipx-sendmail-configure
%attr(755,root,root) %{_bindir}/sipx-archive-common
%attr(755,root,root) %{_bindir}/sipx-package.py*
%attr(755,root,root) %{_bindir}/sipx-swadmin.py*
%attr(755,root,root) %{_bindir}/sipx-zoneadmin.sh
%attr(755,root,root) %{_bindir}/sipx-test-tmp
%attr(755,root,root) %{_bindir}/sipx-test-ssl
%attr(755,root,root) %{_bindir}/sipx-test-selinux
%attr(755,root,root) %{_bindir}/sipx-test-rpmnew
%attr(755,root,root) %{_bindir}/sipx-test-maxfds
%attr(755,root,root) %{_bindir}/sipx-test-localhostShared
%attr(755,root,root) %{_bindir}/sipx-test-localhostConfigured
%attr(755,root,root) %{_bindir}/sipx-test-hostname
%attr(755,root,root) %{_bindir}/sipx-test-dnsIp
%attr(755,root,root) %{_bindir}/sipx-test-apache
%attr(755,root,root) %{_libexecdir}/sipXecs/initial-config
%attr(755,root,root) %{_libexecdir}/sipXecs/sipx-activate-ntp
%attr(755,root,root) %{_libexecdir}/sipXecs/setup.d/010_sipx-activate-ntp
%attr(755,root,root) %{_libexecdir}/sipXecs/sipx-config-httpd-access
%attr(755,root,root) %{_libexecdir}/sipXecs/setup.d/011_sipx-config-httpd-access
%attr(755,root,root) %{_libexecdir}/sipXecs/sipx-config-vxml-domain
%attr(755,root,root) %{_libexecdir}/sipXecs/setup.d/012_sipx-config-vxml-domain
%attr(755,root,root) %{_libexecdir}/sipXecs/ibm_jvm_tmpdir
%attr(755,root,root) %{_libexecdir}/sipXecs/setup.d/020_ibm_jvm_tmpdir
%attr(755,root,root) %{_sysconfdir}/cron.daily/sipx-chkspace
%attr(755,root,root) %{_sysconfdir}/cron.daily/voicemail_clean
%attr(755,root,root) %{_sysconfdir}/cron.daily/sipx-core-clean
%attr(755,root,root) %{_sysconfdir}/cron.daily/sipx-cert-check
%config(noreplace) %attr(644,root,sipx) %{_sysconfdir}/sipxpbx/mime.types
%config(noreplace) %attr(644,root,sipx) %{_sysconfdir}/sipxpbx/httpd-sipx-common-ssl.conf
%config(noreplace) %attr(644,root,sipx) %{_sysconfdir}/sipxpbx/httpd-sipx-common.conf.in
%config(noreplace) %attr(644,root,sipx) %{_sysconfdir}/sipxpbx/httpd.conf
%config(noreplace) %attr(644,root,sipx) %{_sysconfdir}/sipxpbx/httpd-dav.conf
%dir %attr(755,root,sipx) %{_sysconfdir}/sipxpbx/httpd.conf.d
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/logrotate.d/sipx
%dir %attr(775,sipx,root) %{_datadir}/www/doc
%config(noreplace) %attr(755,root,sipx) %{_datadir}/www/doc/index.html
%config(noreplace) %attr(755,root,sipx) %{_datadir}/www/doc/retrieve-update-log.cgi
%config(noreplace) %attr(755,root,sipx) %{_datadir}/www/doc/retrieve-error-log.cgi
%config(noreplace) %attr(755,sipx,sipx) %{_datadir}/www/doc/aa_vxml
%dir %attr(755,root,sipx) %{_datadir}/www/doc/stdprompts_en
%{_datadir}/www/doc/stdprompts_en/*
%config(noreplace) %attr(755,root,sipx) %{_datadir}/www/doc/stdprompts
%config(noreplace) %attr(755,sipx,sipx) %{_datadir}/www/doc/vm_vxml
%config(noreplace) %attr(755,sipx,sipx) %{_localstatedir}/sipxdata/mediaserver
%dir %attr(755,sipx,sipx) %{_datadir}/www/webdav
%dir %attr(755,sipx,sipx) %{_datadir}/www/var
%pre
%post
rm -f %{_bindir}/backup-mailstore.sh
rm -f %{_bindir}/restore-configs.sh
rm -f %{_bindir}/restore-mailstore.sh
rm -f %{_bindir}/backup-configs.sh
rm -rf %{_datadir}/www/cgi-bin/processmonitor
rm -f %{_sysconfdir}/sipxpbx/cbadmission.xml.in
# Reconfigure sendmail (if that is the mail daemon chosen) to ensure
# prompt delivery of voicemail notifications.
sipx-sendmail-configure @PACKAGE_REVISION@
# If this is an upgrade from 3.10, need to setup the SSL db correctly
%{_bindir}/ssl-cert/upgrade-cert.sh >> %{_localstatedir}/log/sipxpbx/upgrade-cert.log 2>&1
%posttrans
# stdprompts should be a symlink now. move aside existing prompts link to stdprompts_en
%define stdpromptsdir %{_datadir}/www/doc/stdprompts
if [ -L %{stdpromptsdir}.rpmnew ] && [ -d %{stdpromptsdir} ]; then
mv %{stdpromptsdir} %{stdpromptsdir}.old
mv %{stdpromptsdir}.rpmnew %{stdpromptsdir}
# rpm has only left files that were modified, so we might as well merge user's private files
# into the new prompts directory
rsync -rv %{stdpromptsdir}.old/ %{stdpromptsdir}_en/
rm -rf %{stdpromptsdir}.old
fi
%preun
# see http://fedoraproject.org/wiki/Packaging/ScriptletSnippets
if [ $1 = 0 ]; then
if [ -x /etc/init.d/sipxpbx ]; then
initScript=sipxpbx
elif [ -x /etc/init.d/sipxecs ]; then
initScript=sipxecs
fi
/etc/init.d/${initScript} stop &>/dev/null || :
if [ -x /sbin/chkconfig ]; then
# RedHat / Fedora
chkconfig --del ${initScript}
else
# SuSE
insserv -r sipxecs
fi
fi
Jump to Line
Something went wrong with that request. Please try again.