Blob Blame History Raw
%define main_version 11.11.1
Name:		svxlink
Epoch:		2
Version:	%{main_version}
Release:	8%{?dist}
Summary:	Repeater controller and EchoLink (simplex or repeater)

Group:		Applications/Internet
#files contained in sounds package are licensed under GPLv2
#the rest of files are licensed under GPLv2+
License:	GPLv2 and GPLv2+
URL:		http://svxlink.sourceforge.net
Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source1:	http://downloads.sourceforge.net/%{name}/sounds-en_US-heather-11.11.tar.bz2
Patch0:		%{name}-%{version}-unistd.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	libsigc++-devel, libmng-devel, tcl-devel, qt-devel, gsm-devel
BuildRequires:	libXi-devel, popt-devel, speex-devel, alsa-lib-devel
BuildRequires:	doxygen, desktop-file-utils, libgcrypt-devel
Requires (preun): chkconfig
Requires (preun): initscripts
Requires (post): chkconfig
Requires (postun): initscripts

%description
The SvxLink project is a multi purpose voice services system for
ham radio use. For example, EchoLink connections are supported.
Also, the SvxLink server can act as a repeater controller.

%package -n libasync
Summary: Svxlink async libs
Group: Development/Libraries
Epoch: 2
Version: 0.18.2

%description -n libasync
The Async library is a programming framework that is used to write event driven
applications. It provides abstractions for file descriptor watches, timers,
network communications, serial port communications and config file reading.

Async is written in such a way that it can support other frameworks. Right now
there are two basic frameworks, a simple "select" based implementation and a Qt
implementation. The idea is that advanced libraries can be implemented in such
a way that they only depend on Async. That means that these libraries can be
used in both Qt and pure console applications and in any future frameworks
supported by Async (e.g. Gtk, wxWidgets etc).

Another big part of Async is the audio pipe framework. It is an audio handling
framework that is geared towards single channel (mono) audio applications. The
framework consists of a large number of audio handling classes such as
audio i/o, filtering, mixing, audio codecs etc.

%package -n libasync-devel
Summary: Svxlink async development files
Group: Development/Libraries
Epoch: 2
Version: 0.18.2
Requires: libasync = %{epoch}:0.18.2
Obsoletes:	svxlink-server-devel < 0.11.1-2

%description -n libasync-devel
The async library development files

%package -n echolib
Summary: EchoLink communications library
Group: Development/Libraries
Epoch: 2
Version: 0.14.1

%description -n echolib
EchoLib is a library that is used as a base for writing EchoLink applications.
It implements the directory server protocol as well as the station to station
protocol. EchoLink is used to link ham radio stations together over the
Internet.

%package -n echolib-devel
Summary: Development files for the EchoLink communications library
Group: Development/Libraries
Epoch: 2
Version: 0.14.1
Requires: echolib = %{epoch}:0.14.1
Obsoletes:	svxlink-server-devel < 0.11.1-2

%description -n echolib-devel
Development files for the EchoLink communications library

%package -n qtel
Summary: The Qt EchoLink Client
Group: Applications/Communications
Epoch: 1
Version: 0.12.0

%description -n qtel
This package contains Qtel, the Qt EchoLink client. It is an implementation of
the EchoLink software in Qt. This is only an EchoLink client, that is it can
not be connected to a transciever to create a link. If it is a pure link node
you want, install the svxlink-server package.

%package -n svxlink-server
Summary: SvxLink - A general purpose voice services system
Epoch: 1
Version: 0.13.1
Group: Applications/Communications
Requires: udev
Requires (pre): shadow-utils

%description -n svxlink-server
The SvxLink server is a general purpose voice services system for ham radio
use. Each voice service is implemented as a plugin called a module.
Some examples of voice services are: Help system, Simplex repeater,
EchoLink communications and voice mail.

The core of the system handle the radio interface and is quite flexible
as well. It can act both as a simplex node and as a repeater controller. It is
also possible to link multiple receivers in via TCP/IP. The best receiver is
chosen using a software voter.

%prep
%setup -q -n %{name}-%{main_version}
%setup -q -D -T -a 1 -n %{name}-%{main_version}
%patch0 -p1 -b unistd
#enable for verbose building
#sed -i -e "s/.SILENT://g" Makefile
#sed -i -e "s/.SILENT://g" makefile.sub
#make realclean

%build
#LDFLAGS="${LDFLAGS:--Wl,-as-needed}" ; export LDFLAGS
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS
make %{?_smp_mflags}
doxygen doxygen.async
doxygen doxygen.echolib


%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} NO_CHOWN=1 LIB_INSTALL_DIR=%{_libdir} \
	INC_INSTALL_DIR=%{_includedir}/svxlink BIN_INSTALL_DIR=%{_bindir} \
	SBIN_INSTALL_DIR=%{_sbindir} PLUGIN_INSTALL_DIR=%{_libdir}/svxlink install
mkdir -p %{buildroot}%{_datadir}/svxlink
cp -a en_US-heather %{buildroot}%{_datadir}/svxlink/
mkdir -p %{buildroot}%{_localstatedir}/log
touch %{buildroot}%{_localstatedir}/log/svxlink
touch %{buildroot}%{_localstatedir}/log/svxlink.{1,2,3,4}
desktop-file-install \
	--dir=%{buildroot}%{_datadir}/applications qtel/qtel.desktop
mv %{buildroot}%{_sysconfdir}/logrotate.d/svxlink %{buildroot}%{_sysconfdir}/logrotate.d/svxlink-server
sed -i -e "s/subsys\/\$PROG/subsys\/svxlink/g" %{buildroot}%{_sysconfdir}/init.d/svxlink
sed -i -e "s/subsys\/\$PROG/subsys\/remotetrx/g" %{buildroot}%{_sysconfdir}/init.d/remotetrx
#remove static libs
rm -f %{buildroot}%{_libdir}/libasync*.a
rm -f %{buildroot}%{_libdir}/libecholib.a
rm -f %{buildroot}%{_libdir}/liblocationinfo.a
rm -f %{buildroot}%{_libdir}/libtrx.a

%post -n libasync -p /sbin/ldconfig
%postun -n libasync -p /sbin/ldconfig

%post -n echolib -p /sbin/ldconfig
%postun -n echolib -p /sbin/ldconfig

%pre -n svxlink-server
getent group daemon >/dev/null || groupadd -r daemon
getent passwd svxlink >/dev/null || \
useradd -r -g daemon -d / -s /sbin/nologin \
-c "SvxLink Daemon " svxlink
exit 0

%post -n svxlink-server
/sbin/chkconfig --add svxlink

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

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

%clean
rm -rf %{buildroot}


%files -n libasync
%defattr(-,root,root,-)
%doc COPYRIGHT async/ChangeLog
%defattr(755,root,root)
%{_libdir}/libasync*.so.*
%{_libdir}/libasync*.*.so

%files -n libasync-devel
%defattr(-,root,root,-)
%doc doc/async/html
%{_libdir}/libasyncaudio.so
%{_libdir}/libasynccore.so
%{_libdir}/libasynccpp.so
%{_libdir}/libasyncqt.so
%dir %{_includedir}/svxlink
%{_includedir}/svxlink/common.h
%{_includedir}/svxlink/Async*
%{_includedir}/svxlink/SigCAudio*.h

%files -n echolib
%defattr(-,root,root,-)
%doc COPYRIGHT echolib/ChangeLog
%defattr(755,root,root)
%{_libdir}/libecholib*.so.*
%{_libdir}/libecholib*.*.so

%files -n echolib-devel
%defattr(-,root,root,-)
%doc doc/echolib/html
%{_libdir}/libecholib.so
%dir %{_includedir}/svxlink
%{_includedir}/svxlink/EchoLink*

%files -n qtel
%defattr(-,root,root,-)
%doc COPYRIGHT qtel/ChangeLog
%{_bindir}/qtel
%{_datadir}/qtel
%{_datadir}/icons/link.xpm
%{_datadir}/applications/qtel.desktop

%files -n svxlink-server
%defattr(-,root,root,-)
%doc COPYRIGHT svxlink/ChangeLog
%{_bindir}/svxlink
%{_bindir}/remotetrx
%{_bindir}/siglevdetcal
%dir %{_libdir}/svxlink
%{_libdir}/svxlink/Module*.so
%dir %{_sysconfdir}/%{name}/svxlink.d
%{_datadir}/svxlink
%defattr(644,root,root)
%config(noreplace) %{_sysconfdir}/%{name}/svxlink.conf
%config(noreplace) %{_sysconfdir}/%{name}/.procmailrc
%config(noreplace) %{_sysconfdir}/%{name}/svxlink.d/*
%config(noreplace) %{_sysconfdir}/%{name}/TclVoiceMail.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/svxlink-server
%config(noreplace) %{_sysconfdir}/logrotate.d/remotetrx
%config(noreplace) %{_sysconfdir}/%{name}/remotetrx.conf
%config(noreplace) %{_sysconfdir}/sysconfig/svxlink
%config(noreplace) %{_sysconfdir}/sysconfig/remotetrx
%config(noreplace) %{_sysconfdir}/security/console.perms.d/90-svxlink.perms
%config(noreplace) %{_sysconfdir}/udev/rules.d/10-svxlink.rules
%{_mandir}/man*/*
%attr(755,svxlink,daemon) %dir %{_localstatedir}/spool/svxlink
%attr(755,svxlink,daemon) %dir %{_localstatedir}/spool/svxlink/voice_mail
%defattr(755,root,root)
%{_sysconfdir}/init.d/svxlink
%{_sysconfdir}/init.d/remotetrx
%defattr(644,root,root)
%ghost /var/log/*

%changelog
* Sat Jan 26 2013 Lucian Langa <cooly@gnome.eu.org> - 2:11.11.1-8
- fix FTBFS

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

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:11.11.1-6
- Rebuilt for c++ ABI breakage

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

* Tue Dec 20 2011 Lucian Langa <cooly@gnome.eu.org> - 2:11.11.1-4
- try to fix epoch in subpackages

* Tue Dec 20 2011 Lucian Langa <cooly@gnome.eu.org> - 2:11.11.1-3
- fix nvr for subpackages too

* Thu Dec 08 2011 Lucian Langa <cooly@gnome.eu.org> - 1:11.11.1-2
- bump nvr to allow full build

* Wed Dec 07 2011 Lucian Langa <cooly@gnome.eu.org> - 11.11.1-1
- new upstream release

* Mon Nov 21 2011 Lucian Langa <cooly@gnome.eu.org> - 11.11-1
- update versions
- update BR
- drop all patches - fixed upstream
- new upstream release

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

* Thu Jul 08 2010 Lucian Langa <cooly@gnome.eu.org> - 090426-5
- add COPYRIGHT license file

* Sun Feb 14 2010 Lucian Langa <cooly@gnome.eu.org> - 090426-4
- -fix implicit dso linking (#564753)

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 090426-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Jun 25 2009 Lucian Langa <cooly@gnome.eu.org> - 090426-2
- obsolete package svxlink-server-devel

* Tue Apr 28 2009 Lucian Langa <cooly@gnome.eu.org> - 090426-1
- update BR
- drop svxlink-devel package
- updated descriptions
- remove dtmf_plot
- drop patch0,1,2,3 as were fixed upstream
- new upstream release

* Thu Feb 26 2009 Lucian Langa <cooly@gnome.eu.org> - 080730-8
- patch to fix gcc44 issues

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 080730-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sun Dec 07 2008 Lucian Langa <cooly@gnome.eu.org> - 080730-6
- added udev dependency
- fixed libs permissions
- update scriptlets

* Sat Dec 06 2008 Lucian Langa <cooly@gnome.eu.org> - 080730-5
- license update

* Wed Dec 03 2008 Lucian Langa <cooly@gnome.eu.org> - 080730-4
- fix duplicated files
- remove static libraries

* Fri Nov 21 2008 Lucian Langa <cooly@gnome.eu.org> - 080730-3
- added fedora optflags
- fix unowned dirs
- spandsp 0.5 patch
- update BR

* Thu Aug 21 2008 Lucian Langa <cooly@gnome.eu.org> - 080730-2
- mangle svxlink conf to include correct libdir
- misc -devel clean

* Sun Aug 10 2008 Lucian Langa <cooly@gnome.eu.org> - 080730-1
- Initial spec (parts of it imported from upstream spec)