%{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)} %{!?tcl_sitelib: %global tcl_sitelib %{_datadir}/tcl%{tcl_version}} %{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}} Name: piaware Version: 9.0.1 Release: 1%{?dist} Summary: Client-side package and programs for forwarding ADS-B data to FlightAware License: BSD URL: https://github.com/flightaware/piaware/ Source0: https://github.com/flightaware/piaware/archive/refs/tags/v%{version}.tar.gz Source1: piaware.sysusers Source2: piaware.service Source3: piaware.config Patch0: piaware-7.2-rpm-no-sudo.patch Patch1: piaware-7.2-rpm-ss-netstat.patch Patch2: piaware-7.2-Makefile.patch BuildArch: noarch BuildRequires: gcc BuildRequires: tcllauncher BuildRequires: tcl BuildRequires: openssl-perl BuildRequires: systemd-rpm-macros Requires: tcl(abi) = 8.6 Requires: tcllauncher Requires: tcltls Requires: itcl Requires: tcllib Requires: dump1090-fa Requires: dump978-fa Requires: python-mlat-client Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %description The basic aim of the piaware package is to forward data read from an ADS-B receiver to FlightAware %prep %autosetup -n %{name}-%{version} -p2 %build # This doesn't really do anything, but we need it for the package notes # side effects on F36+ %make_build %install rm -rf %{buildroot} %make_install # Move the files installed under /usr/lib to the site directories # for tcl install -d %{buildroot}%{tcl_sitelib} mv %{buildroot}/usr/lib/* %{buildroot}%{tcl_sitelib} # Remove the droproot helper, we don't need it rm %{buildroot}%{tcl_sitelib}/piaware_packages/helpers/droproot # Some files contain hard coded paths to files that are now incorrect. # Fix these. sed -i -e 's,/usr/lib/piaware/helpers/,%{_libexecdir}/dump1090-fa/,' \ %{buildroot}%{tcl_sitelib}/piaware/faup1090.tcl sed -i -e 's,/usr/lib/piaware/helpers/,%{_libexecdir}/dump978-fa/,' \ %{buildroot}%{tcl_sitelib}/piaware/faup978.tcl sed -i -e 's,/usr/lib/piaware/helpers/fa-mlat-client,/usr/bin/fa-mlat-client,' \ %{buildroot}%{tcl_sitelib}/piaware/mlat.tcl # The installer copies the tcllauncher binary to /usr/bin under various names. # Replace those with symlinks for i in %{buildroot}%{_bindir}/* ; do rm "${i}" ln -s tcllauncher "${i}" done install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/piaware.conf install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/piaware.service install -p -D -m 0644 -t %{buildroot}%{_sysconfdir}/piaware %{SOURCE3} install -d %{buildroot}%{_var}/cache/piaware %files %license LICENSE.txt MLAT-RESULTS-LICENSE.md %doc README.md %{_bindir}/piaware* %{_bindir}/pirehose %{tcl_sitelib}/* %{_unitdir}/piaware.service %{_mandir}/man*/* %config(noreplace) %{_sysusersdir}/piaware.conf %attr(755,piaware,piaware) %{_var}/cache/piaware %config(noreplace) %{_sysconfdir}/piaware %pre %sysusers_create_compat %{SOURCE1} %post %systemd_post piaware.service %preun %systemd_preun piaware.service %postun %systemd_postun_with_restart piaware.service %changelog * Sun Jan 28 2024 Ralf Ertzinger - 9.0.1-1 - Update to 9.0.1 * Thu Dec 08 2022 Ralf Ertzinger - 8.1-1 - Update to 8.1 * Thu May 05 2022 Ralf Ertzinger - 7.2-1 - Update to 7.2 * Thu Jan 13 2022 Ralf Ertzinger - 7.1-0.1 - Update to 7.1 * Tue Sep 14 2021 Ralf Ertzinger - 6.1-1 - Update to 6.1 * Wed Jul 21 2021 Ralf Ertzinger - 5.0-2 - Patch piaware to use ss instead of netstat * Thu May 27 2021 Ralf Ertzinger - 5.0-1 - Initial build for 5.0