|
| 1 | +%global shorttag 0d2c175c |
| 2 | +Name: direwolf |
| 3 | +Version: 1.6 |
| 4 | +Release: 0.4.20200419git%{shorttag}%{?dist} |
| 5 | +Summary: Sound Card-based AX.25 TNC |
| 6 | + |
| 7 | +License: GPLv2+ |
| 8 | +URL: https://github.com/wb2osz/direwolf/ |
| 9 | +Source0: https://github.com/wb2osz/direwolf/archive/%{version}/%{name}-%{version}.tar.gz |
| 10 | +#Source0: https://github.com/wb2osz/direwolf/archive/%{version}/%{name}-%{shorttag}.tar.gz |
| 11 | + |
| 12 | +BuildRequires: gcc gcc-c++ |
| 13 | +BuildRequires: cmake |
| 14 | +BuildRequires: glibc-devel |
| 15 | +BuildRequires: alsa-lib-devel |
| 16 | +BuildRequires: gpsd-devel |
| 17 | +BuildRequires: hamlib-devel |
| 18 | +BuildRequires: systemd systemd-devel |
| 19 | +Requires: ax25-tools ax25-apps |
| 20 | +Requires(pre): shadow-utils |
| 21 | + |
| 22 | + |
| 23 | +%description |
| 24 | +Dire Wolf is a modern software replacement for the old 1980's style |
| 25 | +TNC built with special hardware. Without any additional software, it |
| 26 | +can perform as an APRS GPS Tracker, Digipeater, Internet Gateway |
| 27 | +(IGate), APRStt gateway. It can also be used as a virtual TNC for |
| 28 | +other applications such as APRSIS32, UI-View32, Xastir, APRS-TW, YAAC, |
| 29 | +UISS, Linux AX25, SARTrack, Winlink Express, BPQ32, Outpost PM, and many |
| 30 | +others. |
| 31 | + |
| 32 | + |
| 33 | +%prep |
| 34 | +%autosetup -n %{name}-%{version} |
| 35 | + |
| 36 | + |
| 37 | +%build |
| 38 | +%cmake -DUNITTEST=1 -DENABLE_GENERIC=1 . |
| 39 | + |
| 40 | + |
| 41 | +%check |
| 42 | +ctest -V %{?_smp_mflags} |
| 43 | + |
| 44 | + |
| 45 | +%install |
| 46 | +%make_install |
| 47 | + |
| 48 | +# Install service file |
| 49 | +mkdir -p ${RPM_BUILD_ROOT}%{_unitdir} |
| 50 | +cp %{_builddir}/%{buildsubdir}/systemd/%{name}.service ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service |
| 51 | + |
| 52 | +# Install service config file |
| 53 | +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig |
| 54 | +cp %{_builddir}/%{buildsubdir}/systemd/%{name}.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} |
| 55 | + |
| 56 | +# Install logrotate config file |
| 57 | +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d |
| 58 | +cp %{_builddir}/%{buildsubdir}/systemd/%{name}.logrotate ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name} |
| 59 | + |
| 60 | +# copy config file |
| 61 | +cp ${RPM_BUILD_ROOT}%{_pkgdocdir}/conf/%{name}.conf ${RPM_BUILD_ROOT}/%{_sysconfdir}/%{name}.conf |
| 62 | + |
| 63 | +# Make log directory |
| 64 | +mkdir -m 0755 -p ${RPM_BUILD_ROOT}/var/log/%{name} |
| 65 | + |
| 66 | +# Move udev rules to system dir |
| 67 | +mkdir -p ${RPM_BUILD_ROOT}%{_udevrulesdir} |
| 68 | +mv ${RPM_BUILD_ROOT}%{_sysconfdir}/udev/rules.d/99-direwolf-cmedia.rules ${RPM_BUILD_ROOT}%{_udevrulesdir}/99-direwolf-cmedia.rules |
| 69 | + |
| 70 | +# Copy doc pngs |
| 71 | +cp direwolf-block-diagram.png ${RPM_BUILD_ROOT}%{_pkgdocdir}/direwolf-block-diagram.png |
| 72 | +cp tnc-test-cd-results.png ${RPM_BUILD_ROOT}%{_pkgdocdir}/tnc-test-cd-results.png |
| 73 | + |
| 74 | +# remove extraneous files |
| 75 | +# This is not a desktop application, per the guidelines. Running it in a terminal |
| 76 | +# does not make it a desktop application. |
| 77 | +rm ${RPM_BUILD_ROOT}/usr/share/applications/direwolf.desktop |
| 78 | +rm ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/direwolf_icon.png |
| 79 | +rm ${RPM_BUILD_ROOT}%{_pkgdocdir}/CHANGES.md |
| 80 | +rm ${RPM_BUILD_ROOT}%{_pkgdocdir}/LICENSE |
| 81 | +rm ${RPM_BUILD_ROOT}%{_pkgdocdir}/README.md |
| 82 | + |
| 83 | +# remove Windows external library directories |
| 84 | +rm -r ${RPM_BUILD_ROOT}%{_pkgdocdir}/external |
| 85 | + |
| 86 | +# Move Telemetry Toolkit sample scripts into docs |
| 87 | +mkdir -p ${RPM_BUILD_ROOT}%{_pkgdocdir}/telem/ |
| 88 | +mv ${RPM_BUILD_ROOT}%{_bindir}/telem* ${RPM_BUILD_ROOT}%{_pkgdocdir}/telem/ |
| 89 | +chmod 0644 ${RPM_BUILD_ROOT}%{_pkgdocdir}/telem/* |
| 90 | + |
| 91 | + |
| 92 | +%package -n %{name}-doc |
| 93 | +Summary: Documentation for Dire Wolf |
| 94 | +BuildArch: noarch |
| 95 | +Requires: %{name} = %{version}-%{release} |
| 96 | + |
| 97 | +%description -n %{name}-doc |
| 98 | +Dire Wolf is a modern software replacement for the old 1980's style |
| 99 | +TNC built with special hardware. Without any additional software, it |
| 100 | +can perform as an APRS GPS Tracker, Digipeater, Internet Gateway |
| 101 | +(IGate), APRStt gateway. It can also be used as a virtual TNC for |
| 102 | +other applications such as APRSIS32, UI-View32, Xastir, APRS-TW, YAAC, |
| 103 | +UISS, Linux AX25, SARTrack, RMS Express, BPQ32, Outpost PM, and many |
| 104 | +others. |
| 105 | + |
| 106 | + |
| 107 | +%files |
| 108 | +%license LICENSE |
| 109 | +%{_udevrulesdir}/99-direwolf-cmedia.rules |
| 110 | +%{_bindir}/* |
| 111 | +%{_mandir}/man1/* |
| 112 | +%{_datadir}/%{name}/* |
| 113 | +%dir %{_pkgdocdir} |
| 114 | +%{_pkgdocdir}/conf/* |
| 115 | +%{_pkgdocdir}/scripts/* |
| 116 | +%{_pkgdocdir}/telem/* |
| 117 | +%{_unitdir}/%{name}.service |
| 118 | +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/%{name} |
| 119 | +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/%{name}.conf |
| 120 | +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name} |
| 121 | +%dir %attr(0755, %{name}, %{name}) /var/log/%{name} |
| 122 | + |
| 123 | +%files -n %{name}-doc |
| 124 | +%{_pkgdocdir}/*.pdf |
| 125 | +%{_pkgdocdir}/*.png |
| 126 | + |
| 127 | +# At install, create a user in group audio (so can open sound card device files) |
| 128 | +# and in group dialout (so can open serial device files) |
| 129 | +%pre |
| 130 | +getent group direwolf >/dev/null || groupadd -r direwolf |
| 131 | +getent passwd direwolf >/dev/null || \ |
| 132 | + useradd -r -g audio -G audio,dialout -d %{_datadir}/%{name} -s /sbin/nologin \ |
| 133 | + -c "Direwolf Sound Card-based AX.25 TNC" direwolf |
| 134 | +exit 0 |
| 135 | + |
| 136 | + |
| 137 | +%changelog |
| 138 | +* Mon Apr 20 2020 Matt Domsch <matt@domsch.com> - 1.6-0.3 |
| 139 | +- drop unneeded BR libax25-devel |
| 140 | + |
| 141 | +* Mon Apr 20 2020 Matt Domsch <matt@domsch.com> - 1.6-0.2 |
| 142 | +- write stdout/err to /var/log/direwolf, logrotate 30 days. |
| 143 | +- run ctest |
| 144 | +- remove CPU instruction tests, leave architecture choice up to the distro |
| 145 | + |
| 146 | +* Sun Apr 19 2020 Matt Domsch <matt@domsch.com> - 1.6-0.1 |
| 147 | +- upstream 1.6 prerelease |
| 148 | +- drop obsolete patches, use cmake |
| 149 | +- add systemd startup, direwolf user |
| 150 | + |
| 151 | +* Tue Mar 31 2020 Richard Shaw <hobbes1069@gmail.com> - 1.5-6 |
| 152 | +- Rebuild for hamlib 4. |
| 153 | + |
| 154 | +* Thu Feb 20 2020 Matt Domsch <matt@domcsh.com> - 1.5-5 |
| 155 | +- Remove unneeded dependency on python2-devel (#1805225) |
| 156 | + |
| 157 | +* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-4 |
| 158 | +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild |
| 159 | + |
| 160 | +* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-3 |
| 161 | +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |
| 162 | + |
| 163 | +* Wed Jul 03 2019 Björn Esser <besser82@fedoraproject.org> - 1.5-2 |
| 164 | +- Rebuild (gpsd) |
| 165 | + |
| 166 | +* Sun Feb 17 2019 Matt Domsch <matt@domsch.com> - 1.5-1 |
| 167 | +- Upgrade to released version 1.5 |
| 168 | +- Apply upstream patch for newer gpsd API |
| 169 | + |
| 170 | +* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-0.2.beta4 |
| 171 | +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |
| 172 | + |
| 173 | +* Mon Aug 27 2018 Matt Domsch <matt@domsch.com> - 1.5-0.1.beta4 |
| 174 | +- Fedora Packaging Guidelines, based on spec by David Ranch |
| 175 | + Moved Telemetry Toolkit examples into examples/ docs. |
0 commit comments