-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjaero.spec
117 lines (99 loc) · 3.79 KB
/
jaero.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Name: jaero
Version: 1.0.4.11
Release: 2%{?dist}
Summary: A SatCom ACARS demodulator and decoder for the Aero standard
# LGPLv2+ for JAERO/gui_classes/console.cpp
License: MIT and LGPLv2+
URL: http://jontio.zapto.org/hda1/jaero.html
Source0: https://github.com/jontio/JAERO/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.xz
Source1: %{name}.appdata.xml
# Fix for Werror=format-security
Patch0: bcb5b78c74f06cc878cb347b9f99b08cddfafef4.patch
# Fix support system qcustomplot
Patch1: fe604fb7e221fc615c0526a48f1f73954d6e70bb.patch
BuildRequires: gcc-c++
BuildRequires: libcorrect-devel
BuildRequires: pkgconfig
BuildRequires: desktop-file-utils
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Multimedia)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(libacars)
BuildRequires: pkgconfig(vorbis)
BuildRequires: kiss-fft-static
BuildRequires: qcustomplot-qt5-devel
BuildRequires: libappstream-glib
Requires: hicolor-icon-theme
Requires: unzip%{?_isa}
%description
JAERO is a program that demodulates and decodes Classic Aero ACARS (Aircraft
Communications Addressing and Reporting System) messages sent from satellites to
aeroplanes (SatCom ACARS), commonly used when planes are beyond VHF range.
Demodulation is performed using the soundcard.
Such signals are typically around 1.5Ghz and can be received with a
low-gain antenna that can be home-brewed in conjunction with an
RTL-SDR dongle.
%prep
%autosetup -p1 -n JAERO-%{version}
## remove bundled libs
# rm -rf kiss_fft130
rm -rf kiss_fft130/kiss_fft*
rm -rf libacars-*
rm -rf libcorrect
rm -rf libogg-*
rm -rf libvorbis-*
rm -rf qcustomplot
# Unbundle kiss-fft
%global TYPE double
echo "INCLUDEPATH += %{_includedir}/kissfft" >> JAERO/JAERO.pro
echo "LIBS += -lkiss_fft_%{TYPE} -lkiss_fftnd_%{TYPE} -lkiss_fftndr_%{TYPE} -lkiss_fftr_%{TYPE} -lkiss_kfc_%{TYPE}" >> JAERO/JAERO.pro
sed -i 's|../kiss_fft130/kiss_fft|kiss_fft|' JAERO/fftwrapper.h
sed -i 's|../kiss_fft130/kiss_fft|kiss_fft|' JAERO/fftrwrapper.h
sed -i 's|../kiss_fft130/kiss_fft|kiss_fft|' JAERO/DSP.h
# Unbundle libacars
# Use prope qcustomplot Qt5 lib
sed -e '/QMAKE_CXXFLAGS_RELEASE/d' \
-e '/VORBIS_PATH/d' \
-e '/OGG_PATH/d' \
-e '/LIBACARS_PATH/d' \
-e 's|lqcustomplot|lqcustomplot-qt5|' \
-e '/kiss_fft130\/kiss_fft/d' -i JAERO/JAERO.pro
# Unbundle libcorrect
sed -i 's|../libcorrect/include/||' JAERO/jconvolutionalcodec.h
# Correct desktop-file
mv JAERO/JAERO.desktop JAERO/%{name}.desktop
sed -e "s|/opt/jaero/JAERO|%{_bindir}/%{name}|" \
-e "s|/opt/jaero/jaero.ico|%{name}|" -i JAERO/%{name}.desktop
# Enable LTO
echo "QMAKE_CXXFLAGS += -flto
QMAKE_LFLAGS_RELEASE += -flto" >> JAERO/JAERO.pro
%build
mkdir JAERO/build
pushd JAERO/build
%{qmake_qt5} ..
%make_build
popd
%install
install -Dpm 0755 JAERO/build/JAERO %{buildroot}%{_bindir}/%{name}
install -Dpm 0644 JAERO/images/primary-modem.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
desktop-file-install JAERO/%{name}.desktop
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml
%check
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml
%files
%license JAERO/LICENSE
%doc README.md
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/metainfo/%{name}.appdata.xml
%changelog
* Thu Oct 31 2019 Vasiliy N. Glazov <[email protected]> - 1.0.4.11-2
- Small spec improvments
* Thu Oct 24 2019 Vasiliy N. Glazov <[email protected]> - 1.0.4.11-1
- Initial release for Fedora