File svxlink.spec of Package svxlink

# spec file for package svxlink
# Copyright (c) 2024 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define QTEL			1.2.5
# Version for the EchoLib library
%define ECHOLIB			1.3.4
# Version for the Async library
%define LIBASYNC		1.7.0
# SvxLink versions
%define SVXLINK			1.8.0
%define REMOTERX		1.8.0
# Sounds version
%define SOUNDS			19.09
Name:           svxlink
Version:        24.02
Release:        0
Summary:        Multi purpose voice services system for ham radio
License:        GPL-2.0-only
Group:          Productivity/Hamradio/Other
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  groff-full
BuildRequires:  gzip
BuildRequires:  libgcrypt-devel
BuildRequires:  libgsm-devel
BuildRequires:  libogg-devel
BuildRequires:  jsoncpp-devel
BuildRequires:  pkgconfig
BuildRequires:  tcl-devel
BuildRequires:  update-desktop-files
BuildRequires:  cmake(Qt5Core)
BuildRequires:  cmake(Qt5Gui)
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  cmake(Qt5Network)
BuildRequires:  cmake(Qt5Widgets)
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(librtlsdr)
BuildRequires:  pkgconfig(opus)
BuildRequires:  pkgconfig(popt)
BuildRequires:  pkgconfig(sigc++-2.0)
BuildRequires:  pkgconfig(speex)

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.

Author Tobias Blomberg (SM0SVX)

%package -n svxlink-server
Version:        %{SVXLINK}
Release:        0
Summary:        SvxLink - A general purpose voice services system
Group:          Productivity/Hamradio/Other
Requires:       logrotate
Requires:       shadow

%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 connection.

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.

%package -n qtel
Version:        %{QTEL}
Release:        0
Summary:        The QT EchoLink Client
Group:          Productivity/Hamradio/Other

%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 libecholib1_3
Version:        %{ECHOLIB}
Release:        0
Summary:        EchoLink library
Group:          Productivity/Hamradio/Other

%description -n libecholib1_3
EchoLink communications library

%package -n libecholib-devel
Version:        %{ECHOLIB}
Release:        0
Summary:        Development files for the EchoLink
Group:          Development/Libraries/Other
Requires:       libecholib1_3 = %{version}
Obsoletes:      libecholib1_3-devel < %{version}-%{release}

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

%package -n libasync1_7
Version:        %{LIBASYNC}
Release:        0
Summary:        SvxLink Async libs
Group:          Productivity/Hamradio/Other
Conflicts:      libasync

%description -n libasync1_7
The Async library files.

%package -n libasync-devel
Version:        %{LIBASYNC}
Release:        0
Summary:        SvxLink Async development files
Group:          Development/Libraries/Other
Requires:       libasync1_7 = %{version}

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

tar -xjvf %{_sourcedir}/svxlink-sounds-en_US-heather-16k-%{SOUNDS}.tar.bz2

cd src
%cmake \
    -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name} \
%make_build man

cd src
cp -r ../en_US-heather-16k/* %{buildroot}%{_datadir}/svxlink/sounds
rm -f %{buildroot}/%{_libdir}/libsvxmisc.a
install -D -m 644 qtel/images/link.xpm %{buildroot}%{_datadir}/icons/link.xpm
%suse_update_desktop_file -c qtel Qtel "EchoLink Client" qtel "%{_datadir}/icons/link.xpm" "Network;HamRadio"
%fdupes -s %{buildroot}

%post -n libecholib1_3 -p /sbin/ldconfig
%postun -n libecholib1_3 -p /sbin/ldconfig
%post -n libasync1_7 -p /sbin/ldconfig
%postun -n libasync1_7 -p /sbin/ldconfig

%files -n svxlink-server
%doc src/svxlink/ChangeLog
%config(noreplace) %{_sysconfdir}/svxlink
%dir %{_libdir}/svxlink
%exclude %{_includedir}/svxlink

%files -n qtel
%doc src/qtel/ChangeLog

%files -n libecholib1_3
%license COPYRIGHT
%doc src/echolib/ChangeLog

%files -n libecholib-devel
%dir %{_includedir}/svxlink

%files -n libasync1_7
%doc src/async/ChangeLog

%files -n libasync-devel
%dir %{_includedir}/svxlink

openSUSE Build Service is sponsored by