Name: sipwitchqt Version: 0.4.2 Release: 1 Summary: Sip server system daemon License: GPLv3+ URL: https://gitlab.com/tychosoft/sipwitchqt Source0: https://www.cherokeesofidaho.org/public/tarballs/%{name}-%{version}.tar.gz Group: system/telephony Vendor: Tycho Softworks BuildRequires: cmake3 >= 3.1.0 BuildRequires: qt5-qtbase-devel, qt5-linguist, gcc-c++, openssl-devel BuildRequires: jemalloc-devel, systemd-devel, avahi-devel, libeXosip2-devel >= 4.0.0 %package server Requires: qt5-qtbase-mysql Summary: A pbx and messaging server for the SIP protocol. Requires(pre): shadow-utils Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %package utils Requires: ruby Summary: sipwitchqt utility scripts and commands %package local Requires: rubygem-sqlite3, sipwitchqt-server, sipwitchqt-utils Summary: Complete local sipwitchqt server with sqlite database %package desktop Summary: A SIP messaging desktop client %description A pbx server and desktop client for the sip protocol %description server A sip server that focuses on reliable delivery of and support for persistent messaging. The server also tries to maintain inter-operation with existing SIP softphones and devices. Features like calling, video, and a security model will also be added in the future. %description utils Extra utility commands and scripts to use with sipwitchqt. This may be used stand-alone to initialize mysql databases for sipwitchqt servers. This also includes sqlite3 local db administration support for use with a server setup with sqlite. %description desktop A desktop client specifically adapted for use with a SipWitchQt server. This includes support for persistent messaging over SIP, as well as automatic management of the server's roster, and the ability to administer a sipwitch server directly from the client. In the future this will include sip calling, video, and a session based security model. %description local Self contained SIP server that bundles sipwitchqt with a local sqlite database and essential supporting utilities to manipulate the database from the command line. %prep %setup -q %build # activate user and group for service sed -i.tmp -e 's/^#User=/User=/' -e 's/^#Group=/Group=/' etc/sipwitchd.service %cmake3 \ -DBOOTSTRAP_EXTERNAL:bool=True \ -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \ -DCMAKE_INSTALL_LOCALSTATEDIR=/var/lib %{__make} %{?_smp_mflags} %install %{__make} install DESTDIR=%{buildroot} %pre server mkdir -p /var/lib/sipwitchqt chmod 0750 /var/lib/sipwitchqt getent group sipwitch >/dev/null || groupadd -r sipwitch getent passwd sipwitch >/dev/null || \ useradd -r -g sipwitch -d /var/lib/sipwitch -s /sbin/nologin \ -c "Sip Witch Service Account" sipwitch %post server chown -R sipwitch:sipwitch /var/lib/sipwitchqt chown sipwitch /etc/sipwitchqt.conf systemctl preset sipwitchd.service %preun server systemctl --no-reload disable sipwitchd.service systemctl stop sipwitchd.service %postun server systemctl daemon-reload %files server %defattr(-,root,root) %doc README.md CONTRIBUTING.md LICENSE CHANGELOG %{_sbindir}/sipwitchqt-server %{_sysconfdir}/sv/sipwitchqt/run %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/default/sipwitchqt %attr(0640,sipwitch,sipwitch) %config(noreplace) %{_sysconfdir}/sipwitchqt.conf %attr(0644,root,root) %{_prefix}/lib/systemd/system/sipwitchd.service %attr(0750,root,root) %{_prefix}/lib/systemd/system-sleep/sipwqt-sleep.sh %{_mandir}/man1/sipwitchqt-server.* %files utils %defattr(-,root,root) %{_sbindir}/ipl-* %{_sbindir}/swcert-* %{_mandir}/man1/swcert-* %{_mandir}/man1/ipl-* %{_datadir}/schemas/*.sql %files local %defattr(-,root,root) %{_sbindir}/swlite-* %{_mandir}/man1/swlite-* %files desktop %defattr(-,root,root) %{_bindir}/sipwitchqt-desktop %{_datadir}/applications/sipwitchqt.desktop %{_datadir}/translations/*.qm %{_datadir}/metainfo/sipwitchqt.appdata.xml %{_datadir}/pixmaps/sipwitchqt.png %{_mandir}/man1/sipwitchqt-desktop.*