File qt-dab5.spec of Package qt-dab

120
 
1
#
2
# spec file for package qt-dab
3
#
4
# Copyright (c) 2014-2023 Wojciech Kazubski <wk@ire.pw.edu.pl>
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via http://bugs.links2linux.org/
16
#
17
18
%define bname qt-dab
19
%define branch qt-dab-s5
20
%define version4 4.8
21
%define version5 5.5
22
%define version6 6.4
23
24
Name:           %{bname}5
25
Version:        %{version5}
26
Release:        0
27
License:        GPL-2.0-or-later
28
Summary:        Simple DAB/DAB+ receiver
29
Url:            http://www.sdr-j.tk/index.html
30
Group:          Productivity/Multimedia/Other
31
Source0:        https://github.com/JvanKatwijk/%{bname}/archive/refs/tags/%{bname}-%{version6}.tar.gz#/%{bname}-Qt-DAB-%{version6}0.tar.gz
32
Patch1:         %{bname}-6.1-use-qwt6-qt5.patch
33
BuildRequires:  cmake
34
BuildRequires:  gcc-c++
35
BuildRequires:  libqt5-qtbase-devel
36
BuildRequires:  qwt6-qt5-devel >= 6.1
37
BuildRequires:  pkgconfig(fftw3)
38
BuildRequires:  hackrf-devel
39
BuildRequires:  pkgconfig(libairspy)
40
BuildRequires:  pkgconfig(librtlsdr)
41
BuildRequires:  sdrplay-devel
42
BuildRequires:  pkgconfig(portaudio-2.0)
43
BuildRequires:  pkgconfig(samplerate)
44
BuildRequires:  pkgconfig(sndfile)
45
BuildRequires:  ImageMagick
46
BuildRequires:  libusb-1_0-devel
47
BuildRequires:  libfaad-devel
48
BuildRequires:  update-desktop-files
49
BuildRequires:  hicolor-icon-theme
50
51
%description
52
This is the implementation of a -relatively simple DAB/DAB+ receiver.
53
The receiver supports terrestrial DAB reception with as input either
54
the stream from a dabstick or a (prerecorded) file, and it will
55
output through the default soundcard.
56
57
58
%prep
59
%setup -q -n %{bname}-Qt-DAB-%{version6}0
60
%patch -P 1 -p 1
61
chmod a-x README.md AUTHORS COPYING LICENSE 
62
63
#rename files
64
mv src/scopes-qwt6/iqdisplay.cpp-xxx src/scopes-qwt6/iqdisplay.cpp
65
mv includes/scopes-qwt6/iqdisplay.h-xxx includes/scopes-qwt6/iqdisplay.h
66
67
68
%build
69
cd %{branch}
70
%cmake \
71
    -DAIRSPY=ON \
72
    -DHACKRF=ON \
73
    -DRTLSDR=ON \
74
    -DRTLTCP=ON \
75
    -DSDRPLAY=ON
76
%cmake_build
77
78
79
%install
80
cd %{branch}
81
%cmake_install
82
mkdir -p %{buildroot}%{_bindir}
83
mv %{buildroot}/usr/%{bname}-%{version} %{buildroot}%{_bindir}/%{bname}-5
84
85
#install desktop file
86
%suse_update_desktop_file -G Qt-DAB -i %{bname}-5 AudioVideo Tuner 
87
88
#create and install icons
89
convert %{bname}-5.ico %{bname}.png
90
install -Dpm 0644 %{bname}-7.png \
91
    %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{bname}.png
92
install -Dpm 0644 %{bname}-6.png \
93
    %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/%{bname}.png
94
install -Dpm 0644 %{bname}-5.png \
95
    %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{bname}.png
96
install -Dpm 0644 %{bname}-4.png \
97
    %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{bname}.png
98
install -Dpm 0644 %{bname}-3.png \
99
    %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/%{bname}.png
100
install -Dpm 0644 %{bname}-2.png \
101
    %{buildroot}%{_datadir}/icons/hicolor/72x72/apps/%{bname}.png
102
install -Dpm 0644 %{bname}-1.png \
103
    %{buildroot}%{_datadir}/icons/hicolor/96x96/apps/%{bname}.png
104
install -Dpm 0644 %{bname}-0.png \
105
    %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{bname}.png
106
107
108
%check
109
110
111
%files
112
%doc AUTHORS README.md
113
%license COPYING
114
%{_bindir}/*
115
%{_datadir}/applications/%{bname}-5.desktop
116
%{_datadir}/icons/hicolor/*x*/apps/%{bname}.png
117
118
119
%changelog
120