File linrad.spec of Package linrad
# spec file for package linrad
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#
%bcond_with libfdms1
%ifarch x86_64
%define build_with_clfft 1
%endif
Name: linrad
Version: 05.02
Release: 0
Summary: SDR Application for Linux
License: MIT
Group: Productivity/Hamradio/Other
URL: http://www.nitehawk.com/sm5bsz/linuxdsp/linrad.htm
#SVN-Url: https://svn.code.sf.net/p/linrad/code/trunk
Source: http://www.nitehawk.com/sm5bsz/linuxdsp/archive/lir05-02.tbz
Source1: %{name}.desktop
Source2: %{name}.png
Source3: %{name}-wrapper.sh
Patch1: linrad-obey-cflags.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libftdi0-devel
BuildRequires: libperseus-sdr-devel
BuildRequires: libstdc++-devel
BuildRequires: nasm
BuildRequires: opencl-headers
BuildRequires: pkgconfig
BuildRequires: soft66-devel
BuildRequires: pkgconfig(OpenCL)
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(jack)
BuildRequires: pkgconfig(libairspy)
BuildRequires: pkgconfig(libairspyhf)
BuildRequires: pkgconfig(libbladeRF)
BuildRequires: pkgconfig(libmirisdr)
BuildRequires: pkgconfig(librtlsdr)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(portaudio-2.0)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
# Upstream hardcoded library names !!!
Requires: libftdi0-devel
Requires: libperseus-sdr-devel
Requires: soft66-devel
Requires: pkgconfig(alsa)
Requires: pkgconfig(jack)
Requires: pkgconfig(libairspy)
Requires: pkgconfig(libairspyhf)
Requires: pkgconfig(libbladeRF)
Requires: pkgconfig(libmirisdr)
Requires: pkgconfig(librtlsdr)
Requires: pkgconfig(libudev)
Requires: pkgconfig(libusb-1.0)
Requires: pkgconfig(portaudio-2.0)
#
Requires(post): hicolor-icon-theme
Requires(post): update-desktop-files
Requires(postun): hicolor-icon-theme
Requires(postun): update-desktop-files
%if %{with libfdms1}
BuildRequires: libfdms1
Requires: libfdms1
%endif
%if 0%{?build_with_clfft}
BuildRequires: pkgconfig(clFFT)
Requires: pkgconfig(clFFT)
%endif
%description
Software defined radio (SDR) with Linux
%prep
%setup -q
%patch1 -p1
# Fix path for help and error files
sed -i 's|help.lir|%{_datadir}/linrad/help.lir|g' menu.c help.c
sed -i 's|errors.lir|%{_datadir}/linrad/errors.lir|g' help.c
%build
export CFLAGS="%optflags -fcommon"
autoreconf -fiv
%configure
make %{?_smp_mflags}
%if %{__isa_bits} == 64
make %{?_smp_mflags} xlinrad64
%else
make %{?_smp_mflags} xlinrad
%endif
%install
install -Dm 0755 xlinrad* %{buildroot}/%{_libexecdir}/%{name}/%{name}
install -d %{buildroot}/%{_datadir}/%{name}
install -m 0644 help.lir %{buildroot}/%{_datadir}/%{name}/
install -m 0644 errors.lir %{buildroot}/%{_datadir}/%{name}/
install -Dm 0644 %{SOURCE1} %{buildroot}/%{_datadir}/applications/linrad.desktop
install -Dm 0644 %{SOURCE2} %{buildroot}/%{_datadir}/pixmaps/%{name}.png
install -Dm 0755 %{SOURCE3} %{buildroot}/%{_bindir}/x%{name}
%suse_update_desktop_file -i %{name}
%files
%doc z_APM.txt z_BUFFERS.txt z_CALIBRATE.txt z_COPYRIGHT.txt z_GIFINFO.txt z_MOUSE.txt z_PARALLEL_PORT.txt z_SETTINGS.txt z_USERS_EXTRA.txt z_USERS_HWARE.txt
%{_bindir}/x%{name}
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog