%global forgeurl https://github.com/antirez/%{name} %global commit de61bd564f1aa929bae414a70e421acd0b81789a %forgemeta Name: dump1090 Version: 0 Release: 4%{?dist} Summary: Simple Mode S decoder specifically designed for RTLSDR devices License: BSD URL: %{forgeurl} Source0: %{forgesource} # Man page Source1: dump1090.md # Move data file gmap.html from current directory to /usr/share/dump1090 # so it will run out of the box for any user. # There are many ways to run the daemon, and no obvious standard system service. # https://github.com/antirez/dump1090/issues/163 Patch0: dump1090-share.patch BuildRequires: gcc rtl-sdr-devel BuildRequires: pandoc %description Dump 1090 is a Mode S decoder specifically designed for RTLSDR devices. Install this to use your RTL-SDR to track commercial aircraft in your area. The main features are: * Robust decoding of weak messages, with mode1090 many users observed improved range compared to other popular decoders. * Network support: TCP30003 stream (MSG5...), Raw packets, HTTP. * Embedded HTTP server that displays the currently detected aircraft on Google Map. * Single bit errors correction using the 24 bit CRC. * Ability to decode DF11, DF17 messages. * Ability to decode DF formats like DF0, DF4, DF5, DF16, DF20 and DF21 where the checksum is xored with the ICAO address by brute forcing the checksum field using recently seen ICAO addresses. * Decode raw IQ samples from file (using --ifile command line switch). * Interactive command-line interface mode where aircraft currently detected are shown as a list refreshing as more data arrives. * CPR coordinates decoding and track calculation from velocity. * TCP server streaming and receiving raw data to/from connected clients (using --net). %prep %forgeautosetup # Extract LICENSE from source # https://github.com/antirez/dump1090/issues/164 sed -ne 's/^ \*//' -e '/Copyright/,/DAMAGE\./p' anet.h >LICENSE pandoc -s -tman -o %{name}.1 %{SOURCE1} %build %set_build_flags %make_build %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/%{name} install -pm 755 dump1090 %{buildroot}%{_bindir} install -pm 644 gmap.html %{buildroot}%{_datadir}/%{name} cp -pr tools %{buildroot}%{_datadir}/%{name} mkdir -p %{buildroot}%{_mandir}/man1 install -pm 644 %{name}.1 %{buildroot}%{_mandir}/man1 %check sha256=$(./dump1090 --ifile testfiles/modes1.bin | sha256sum) goodsha256="38144d6ab7c64b801ec3e8a9165ca2e25ce6b56374ae7c542f7b546e313c65dd -" test "$sha256" = "$goodsha256" %files %license LICENSE %doc README.md TODO %{_bindir}/dump1090 %{_datadir}/%{name} %{_mandir}/man1/%{name}.1.gz %changelog * Wed Aug 11 2021 Stuart D. Gathman 0-4.20210727gitde61bd5 - Add markdown man page * Wed Aug 4 2021 Stuart D. Gathman 0-3.20210727gitde61bd5 - Minor formatting nits * Mon Aug 2 2021 Stuart D. Gathman 0-2.20210727gitde61bd5 - Link to issue for patch - use %%set_build_flags macro - use %%forge macros - extract LICENSE from anet.h - fix perms on gmap.html * Tue Jul 27 2021 Stuart D. Gathman 0-1.20210727gitde61bd5 - Initial RPM