File eti-stuff.spec of Package eti-stuff
#
# spec file for package eti-stuff
#
# Copyright (c) 2025, Martin Hauke <mardnh@gmx.de>
#
# 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 http://bugs.opensuse.org/
#
Name: eti-stuff
Version: 0~git20250621
Release: 0
Summary: Misc tools for ETI (ETS 300 799 for Digital Audio Broadcasting)
License: GPL-2.0-only
Group: Productivity/Hamradio/Other
URL: https://github.com/JvanKatwijk/eti-stuff
#Git-Clone: https://github.com/JvanKatwijk/eti-stuff.git
Source: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(faad2)
BuildRequires: pkgconfig(fftw3f)
BuildRequires: pkgconfig(libairspy)
BuildRequires: pkgconfig(libhackrf)
BuildRequires: pkgconfig(librtlsdr)
BuildRequires: pkgconfig(portaudio-2.0)
BuildRequires: pkgconfig(samplerate)
BuildRequires: pkgconfig(sndfile)
%description
"eti-stuff" is an attempt to understand the eti structure as defined
in ETS 300 799 for Digital Audio Broadcasting (DAB and DAB+).
eti-cmdline
is a very simplified DAB decoder that translates an incoming DAB
transmission into sequence of ETI frames.
eti-cmdline is based on the dab-cmdline software with code included
from dabtools to actually decode the eti frames.
It is - as the name suggests - a command line version.
eti-cmdline now supports a whole range of devices.
eti-backend
merely built to test somethings, reads in an ETI sequence and
interprets the data, allowing selection of a service. If decoding
an ETI stream is required, one is advised to use dablin rather than
eti-backend.
%prep
%autosetup -p1
mv eti-backend/README.md README-eti-backend.md
mv eti-backend/license license-eti-backend
mv eti-cmdline/README.md README-eti-cmdline.md
# fix spurious exec permissions
chmod -x LICENSE README.md README-eti-backend.md license-eti-backend README-eti-cmdline.md
%build
mkdir eti-cmd-mybuild
###############
# eti-cmdline
# Note: only one "device" per build is supported at the moment
##############
# eti-cmdline-rtlsdr
pushd eti-cmdline
%cmake \
-DRTLSDR=ON \
%make_jobs
popd
mv eti-cmdline/build/eti-cmdline-rtlsdr eti-cmd-mybuild/
rm -Rf eti-cmdline/build
# eti-cmdline-rtl_tcp
pushd eti-cmdline
%cmake \
-DRTL_TCP=ON \
%make_jobs
popd
mv eti-cmdline/build/eti-cmdline-rtl_tcp eti-cmd-mybuild/
rm -Rf eti-cmdline/build
# eti-cmdline-airspy
pushd eti-cmdline
%cmake \
-DAIRSPY=ON \
%make_jobs
popd
mv eti-cmdline/build/eti-cmdline-airspy eti-cmd-mybuild/
rm -Rf eti-cmdline/build
# eti-cmdline-hackrf
pushd eti-cmdline
%cmake \
-DHACKRF=ON \
%make_jobs
popd
mv eti-cmdline/build/eti-cmdline-hackrf eti-cmd-mybuild/
rm -Rf eti-cmdline/build
# eti-cmdline-rawfiles
pushd eti-cmdline
%cmake \
-DRAWFILES=ON \
%make_jobs
popd
mv eti-cmdline/build/eti-cmdline-rawfiles eti-cmd-mybuild/
rm -Rf eti-cmdline/build
# eti-cmdline-wavfiles
pushd eti-cmdline
%cmake \
-DWAVFILES=ON \
%make_jobs
popd
mv eti-cmdline/build/eti-cmdline-wavfiles eti-cmd-mybuild/
rm -Rf eti-cmdline/build
# eti-cmdline-xmlfiles
pushd eti-cmdline
%cmake \
-DXMLFILES=ON \
%make_jobs
popd
mv eti-cmdline/build/eti-cmdline-xmlfiles eti-cmd-mybuild/
rm -Rf eti-cmdline/build
##############
# eti-backend
##############
pushd eti-backend
%cmake
%make_jobs
popd
%install
# eti-cmdline
for device in rtlsdr rtl_tcp airspy hackrf rawfiles wavfiles xmlfiles; do
install -D -m0755 "eti-cmd-mybuild/eti-cmdline-$device" "%{buildroot}/%{_bindir}/eti-cmdline-$device";
done
# eti-backend
install -D -m0755 ./eti-backend/build/eti-backend %{buildroot}/%{_bindir}/eti-backend
# TODO
# install scripts
# - eti-cmdline/compile-station-list.py
# - eti-cmdline/play-radio.sh
%files
%license LICENSE license-eti-backend
%doc README.md
%{_bindir}/eti-backend
%{_bindir}/eti-cmdline-rtlsdr
%{_bindir}/eti-cmdline-rtl_tcp
%{_bindir}/eti-cmdline-airspy
%{_bindir}/eti-cmdline-hackrf
%{_bindir}/eti-cmdline-rawfiles
%{_bindir}/eti-cmdline-wavfiles
%{_bindir}/eti-cmdline-xmlfiles
%changelog