Blob Blame History Raw
# Copyright (c) 2008, 2009, 2010 David Sugar, Tycho Softworks.
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

%global _hardened_build 1

Name: sipwitch
Summary: A secure peer-to-peer VoIP server for the SIP protocol
Version: 1.4.0
Release: 4%{?dist}
License: GPLv3+
URL: http://www.gnu.org/software/sipwitch
Group: Applications/Communications
Source: http://www.gnutelephony.org/dist/tarballs/sipwitch-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: ucommon-devel >= 6.0.0
BuildRequires: libeXosip2-devel >= 3.0.0
BuildRequires: avahi-devel
BuildRequires: openssl-devel
BuildRequires: qt4-devel
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
Requires(postun): initscripts
Requires: %{name}-runtime = %{version}-%{release}

%package runtime
Group: Development/Libraries
Summary: Runtime library support for sipwitch

%package devel
Requires: ucommon-devel >= 6.0.0
Requires: %{name}-runtime = %{version}-%{release}
Group: Development/Libraries
Summary: Headers for building sipwitch plugins

%package cgi
Requires: %{name} = %{version}-%{release}
Group: Applications/CGI
Summary: cgi web interface to control sipwitch server

%package plugin-zeroconf
Requires: %{name} = %{version}-%{release}
Summary: Zeroconf plugin for sipwitch

%package plugin-scripting
Requires: %{name} = %{version}-%{release}
Summary: Scripting plugin for sipwitch

%package plugin-forward
Requires: %{name} = %{version}-%{release}
Summary: Forward registration and routing plugin

%package plugin-subscriber
Requires: %{name} = %{version}-%{release}
Summary: Subscriber gateway plugin for sipwitch

%package gui
Summary: user agent to monitor running sipwitch process
Requires: sipwitch

%description
GNU SIP Witch is a secure peer-to-peer VoIP server.  Calls can be made even
behind NAT firewalls, and without needing a service provider.  SIP Witch can
be used on the desktop to create bottom-up secure calling networks as a
free software alternative to Skype.  SIP Witch can also be used as a stand-
alone SIP-based office telephone server, or to create secure VoIP networks
for an existing IP-PBX such as Asterisk, FreeSWITCH, or Yate.

%description devel
Header files for building plugins that interface with sipwitch. This might be
used for externally creating sipwitch modules, though normally modules are
found or added to the core distribution directly.  This may also be for
developing external application services which need to communicate with a
running sipwitch daemon instance.

%description runtime
Runtime library required for sipwitch development and for using the server.
This is available as a separate package so that one building sipwitch plugins
with the required devel package does not also require installing a server
image.

%description cgi
This package offers a means to perform remote management of a sipwitch
server using the cgi interface of an installed web server.  The primary
service this offers is xmlrpc access to sipwitch shared memory and
control interfaces in a manner analgolous to the sipwitch command utility.

%description plugin-zeroconf
This plugin activates zeroconf network services for sipwitch and publishes
sipwitch as a sip server.

%description plugin-scripting
This plugin enables shell scripting in connection with specific sipwitch
events.

%description plugin-forward
This plugin enables forwarding of registration requests and destination routes
for unknown numbers so that one can create a "secure" peer to peer media
domain managed by sipwitch and still access an "insecure" b2bua based ip-pbx.

%description plugin-subscriber
This module is meant to eventually offer generic support for premise
routers when used by providers to offer sip/voip service to a subscriber.
It offers rtp proxying and routing based on the assumption that all calls
will be handed off to an external voip provider and automatic rtp
proxy bridging between a subscribers local subnet and an isp.  In theory
this would be deployed in an isp supplied premise router to enable a
local user to subscribe a series of local softphone/sip devices with a
remote voip service provider.

%description gui
This package offers the switchview user agent to monitor the activity of
your locally installed sipwitch service.

%prep
%setup -q

%build
export UIC=%{_bindir}/uic-qt4 MOC=%{_bindir}/moc-qt4
%configure --with-pkg-config --disable-static --with-initrddir=%{_initrddir}

%{__make} %{?_smp_mflags}

%install
%{__rm} -rf %{buildroot}
%{__make} DESTDIR=%{buildroot} INSTALL="install -p" install
%{__rm} -f %{buildroot}/%{_libdir}/*.la
%{__rm} -f %{buildroot}/%{_libdir}/sipwitch/*.la
echo "PLUGINS=auto" >>%{buildroot}/%{_sysconfdir}/sysconfig/sipwitch

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc README COPYING NEWS FEATURES SUPPORT TODO NOTES AUTHORS MODULES ChangeLog
%{_mandir}/man1/sipwitch.1*
%{_mandir}/man1/sippasswd.1*
%{_mandir}/man1/sipquery.1*
%{_mandir}/man8/sipw.8*
%{_sbindir}/sipw
%{_bindir}/sipquery
%{_bindir}/sipwitch
%attr(04755,root,root) %{_bindir}/sippasswd
%dir %{_libdir}/sipwitch
%config(noreplace) %{_sysconfdir}/logrotate.d/sipwitch
%attr(0755,root,root) %{_initrddir}/sipwitch
%attr(0755,root,root) %{_sysconfdir}/cron.hourly/sipwitch
%attr(0770,root,root) %dir %{_sysconfdir}/sipwitch.d
%attr(0660,root,root) %config(noreplace) %{_sysconfdir}/sipwitch.conf
%attr(0660,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/sipwitch
%attr(0660,root,root) %config(noreplace) %{_sysconfdir}/sipwitch.d/*.xml*

%files cgi
%defattr(-,root,root,-)
%{_mandir}/man8/sipwitch-cgi.8*
%{_bindir}/sipwitch-cgi
%{_libdir}/cgi-bin/sipwitch

%files runtime
%defattr(-,root,root,-)
%{_libdir}/*.so.*

%files plugin-zeroconf
%defattr(-,root,root,-)
%{_libdir}/sipwitch/zeroconf.so

%files plugin-forward
%defattr(-,root,root,-)
%{_libdir}/sipwitch/forward.so

%files plugin-scripting
%defattr(-,root,root,-)
%{_libdir}/sipwitch/scripting.so

%files plugin-subscriber
%defattr(-,root,root,-)
%{_libdir}/sipwitch/subscriber.so

%files devel
%defattr(-,root,root,-)
%{_libdir}/*.so
%{_includedir}/sipwitch/
%{_libdir}/pkgconfig/*.pc
%{_bindir}/sipwitch-config
%{_mandir}/man1/sipwitch-config.*

%files gui
%defattr(-,root,root,0755)
%{_bindir}/switchview
/etc/xdg/autostart/switchview-autostart.desktop
%{_datadir}/applications/switchview.desktop
%{_datadir}/pixmaps/switchview.png
%{_mandir}/man1/switchview.1*

%post runtime
/sbin/ldconfig

%post
/sbin/chkconfig --add sipwitch

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

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

%postun runtime
/sbin/ldconfig

%changelog
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed May 29 2013 David Sugar <dyfet@gnutelephony.org> - 1.4.0-3
- Added PIE hardened flags per #965484

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Tue Nov 20 2012 David Sugar <dyfet@gnutelephony.org> - 1.4.0-1
- Updated for new version 6 ucommon api

* Mon Sep 24 2012 David Sugar <dyfet@gnutelephony.org> - 1.3.2-1
- public access hotspot mode support added

* Tue Aug 07 2012 David Sugar <dyfet@gnutelephony.org> 1.3.1-1
- future proofing with support for building with 4.x exosip2 releases
- autoconfig event api for switchview client

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Jun 26 2012 David Sugar <dyfet@gnutelephony.org> - 1.2.5-1
- fix for group permissions and overlinking
- new interface options through config for nat

* Wed Feb 29 2012 David Sugar <dyfet@gnutelephony.org> - 1.2.3-1
- new policy command
- bug fix for xml parsing
- new user config options for testing
- improved management

* Sun Jan 15 2012 David Sugar <dyfet@gnutelephony.org> - 1.2.1-1
- new upstream release
- essential fix for cpu loading in subscriber plugin
- new usercache api functionality

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Dec 26 2011 Alexey Kurov <nucleo@fedoraproject.org> - 1.1.4-1
- sipwitch-1.1.4

* Sun Nov 20 2011 Alexey Kurov <nucleo@fedoraproject.org> - 1.1.3-1
- sipwitch-1.1.3

* Wed Oct 12 2011 Alexey Kurov <nucleo@fedoraproject.org> - 1.1.2-1
- sipwitch-1.1.2
- renaming and reorg of sipwitch cgi binary

* Fri Sep  2 2011 Alexey Kurov <nucleo@fedoraproject.org> - 1.1.1-1
- sipwitch-1.1.1
- add BR: qt4-devel
- add -gui subpkg

* Wed Jun 29 2011 David Sugar <dyfet@gnutelephony.org> - 1.0.3-0
- fixed init script issue, per bug #712546
- new internal redirection api simplifies plugin linking
- extended header documentation

* Sun May 22 2011 David Sugar <dyfet@gnutelephony.org> - 1.0.1-0
- 1.0 baseline release
- updated for ucommon 5.0 api
- fixes for plugin paths and reporting load-time plugin errors

* Sun Mar 20 2011 David Sugar <dyfet@gnutelephony.org> - 0.10.3-0
- consolidated and reorganized utilities

* Thu Feb 24 2011 David Sugar <dyfet@gnutelephony.org> - 0.9.3-0
- fixed default domain as hostname

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Nov 09 2010 David Sugar <dyfet@gnutelephony.org> - 0.9.2-0
- updated for newer ucommon.
- configuration of tls support added.
- fix for registration with contact info.

* Thu Aug 12 2010 David Sugar <dyfet@gnutelephony.org> - 0.9.0-0
- requires ucommon 3.3.4 or later.

* Sun Jul 11 2010 David Sugar <dyfet@gnutelephony.org> - 0.8.4-2
- better tracking of invalid request uri's.
- interface state change notification support.
- better prack support.
- libnotify plugin temporarily disabled for rawhide gtk build issues.

* Sun Apr 11 2010 David Sugar <dyfet@gnutelephony.org> - 0.8.0-0
- support for new ucommon abi.
- libnotify plugin added.

* Sun Mar 21 2010 David Sugar <dyfet@gnutelephony.org> - 0.7.5-0
- fixed init script for systems without init lock directories.
- push PLUGINS=auto to sysconfig defaults.

* Sun Mar 14 2010 David Sugar <dyfet@gnutelephony.org> - 0.7.4-0
- fixed sippasswd to send digest rather than realm to running server.
- separated packaging and install of cgi webservice.
- new runtime server debug and monitoring operations.

* Fri Feb 12 2010 David Sugar <dyfet@gnutelephony.org> - 0.7.1-0
- Moved lab.xml to lab.xml-example so not part of default config.
- Removed config conflict when started in pure user mode.

* Sun Feb 07 2010 David Sugar <dyfet@gnutelephony.org> - 0.7.0-0
- NAT media functionality and internodal remote.
- merger of domain and realm server definitions.
- clearer source aliasing of remote calls between network domains.

* Sat Jan 23 2010 David Sugar <dyfet@gnutelephony.org> - 0.6.2-0
- use uuid for unset authentication realms.
- saner default configuration file.

* Wed Jan 20 2010 David Sugar <dyfet@gnutelephony.org> - 0.6.1-0
- user account integration with sip accounts.
- exec hook for packaging systems that done use fakeroot.

* Sun Jan 17 2010 David Sugar <dyfet@gnutelephony.org> - 0.5.13-0
- sip realm fully externalized and new siprealm utility added.

* Wed Dec 09 2009 David Sugar <dyfet@gnutelephony.org> - 0.5.12-0
- redefined internal user & service permissions and profiles.
- fixed anonymous inbound.
- added missing manpages.

* Thu Nov 19 2009 David Sugar <dyfet@gnutelephony.org> - 0.5.9-0
- removed snmp/mib from this package
- removed unused swig support and complex packaging it required.

* Fri Aug 14 2009 David Sugar <duyfet@gnutelephony.org> - 0.5.7-1
- memory corruption issue in allocating subnet access objects fixed

* Mon Jul 13 2009 Remi Collet <Fedora@FamilleCollet.com> - 0.5.6-1
- rebuild for new PHP 5.3.0 ABI (20090626)
- add PHP ABI check
- add php configuration file (/etc/php.d/sipwitch.ini)

* Sat Jul 04 2009 - David Sugar <dyfet@gnutelephony.org> - 0.5.6-0
- split runtime from server to build plugins without requiring server.
- removed separate rtp proxy, functionality will be integrated into server.

* Wed Jun 10 2009 - David Sugar <dyfet@gnutelephony.org> - 0.5.5-0
- upstream fixed in rel 0.5.5, no patches now needed for rpm distros.

* Sun May 10 2009 - David Sugar <dyfet@gnutelephony.org> - 0.5.4-3
- new generic init script layout as a patch until next upstream release.

* Fri May 08 2009 - David Sugar <dyfet@gnutelephony.org> - 0.5.4-2
- some fixups until upstream is changed, and new init scriptlets.

* Wed May 06 2009 - David Sugar <dyfet@gnutelephony.org> - 0.5.4-1
- temporary patch file added until upstream catches up, other cleanup.

* Sat May 02 2009 - David Sugar <dyfet@gnutelephony.org> - 0.5.4-0
- spec file updated for redhat/fedora submission.

* Fri Jul 25 2008 - David Sugar <dyfet@gnutelephony.org> - 0.2.0-0
- spec file updated for plugins and new library naming.

* Mon Jul 21 2008 - David Sugar <dyfet@gnutelephony.org> - 0.1.0-0
- initial spec file distribution.