5dc08fc
%define uprel 15
5dc08fc
Name: aprsd
5dc08fc
Summary: Internet gateway and client access to amateur radio APRS packet data
5dc08fc
Version: 2.2.5
0b9e11c
Release: %{uprel}.6%{?dist}.14
5dc08fc
Group: Applications/Internet
5dc08fc
License: GPLv2+
5dc08fc
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}-%{uprel}.tar.gz
5dc08fc
Source1: aprsd.conf
0e59f98
Source2: aprsd.service
5dc08fc
Source3: INIT.TNC
5dc08fc
Source4: user.deny
5dc08fc
Source5: welcome.txt
5dc08fc
Source6: RESTORE.TNC
d80b68a
Source7: aprsd.logrotate
5dc08fc
Patch0: aprsd-2.2.5-15-compile.patch
5dc08fc
Patch1: aprsd-2.2.5-15-gcc43-port.patch
5dc08fc
Patch2: aprsd-2.2.5-15-sysconfdir.patch
5dc08fc
URL: http://sourceforge.net/projects/aprsd/
bc59ed2
BuildRequires: libax25-devel
df19ad0
BuildRequires: systemd-units
0e59f98
#Requires (preun): /sbin/chkconfig
0e59f98
#Requires (preun): /sbin/service
0e59f98
#Requires (post): /sbin/chkconfig
0e59f98
Requires(post): systemd-units
0e59f98
Requires(preun): systemd-units
0e59f98
Requires(postun): systemd-units
0e59f98
5dc08fc
5dc08fc
%description
5dc08fc
APRSd is an APRS server program that uses amateur radio and internet
5dc08fc
services to convey GPS mapping, weather, and positional data.
5dc08fc
It has been developed by and for amateur radio enthusiasts to provide
5dc08fc
real-time data in an easy to use package.
5dc08fc
5dc08fc
%prep
5dc08fc
%setup -q -n %{name}-%{version}-%{uprel}
5dc08fc
%patch0 -p1 -b compile
5dc08fc
%patch1 -p1 -b gccport
5dc08fc
%patch2 -p1 -b sysconfdir
5dc08fc
5dc08fc
%build
5dc08fc
%configure
5dc08fc
make %{?_smp_mflags}
5dc08fc
5dc08fc
%install
5dc08fc
make install DESTDIR="%{buildroot}" INSTALL="install -p"
5dc08fc
mkdir -p %{buildroot}%{_sysconfdir}
0e59f98
mkdir -p %{buildroot}%{_sysconfdir}/aprsd
0e59f98
mkdir -p %{buildroot}%{_unitdir}
d80b68a
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
5dc08fc
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/aprsd/aprsd.conf
0e59f98
install -m 755 %{SOURCE2} %{buildroot}%{_unitdir}/aprsd.service
5dc08fc
install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/aprsd/INIT.TNC
5dc08fc
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/aprsd/user.deny
5dc08fc
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/aprsd/welcome.txt
5dc08fc
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/aprsd/RESTORE.TNC
d80b68a
install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/logrotate.d/aprsd
d80b68a
mkdir -p %{buildroot}%{_localstatedir}
d80b68a
mkdir -p %{buildroot}%{_localstatedir}/log/aprsd
5dc08fc
5dc08fc
%clean
5dc08fc
rm -rf %{buildroot}
5dc08fc
5dc08fc
%post
0e59f98
#/sbin/chkconfig --add aprsd
0e59f98
if [ $1 -eq 1 ] ; then 
0e59f98
    # Initial installation 
0e59f98
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
0e59f98
fi
0e59f98
5dc08fc
5dc08fc
%preun
0e59f98
#if [ $1 = 0 ]; then
0e59f98
# /sbin/service aprsd stop > /dev/null 2>&1
0e59f98
# /sbin/chkconfig --del aprsd
0e59f98
#fi
0e59f98
if [ $1 -eq 0 ] ; then
0e59f98
    # Package removal, not upgrade
0e59f98
    /bin/systemctl --no-reload disable aprsd.service > /dev/null 2>&1 || :
0e59f98
    /bin/systemctl stop aprsd.service > /dev/null 2>&1 || :
0e59f98
fi
0e59f98
0e59f98
%postun
0e59f98
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
0e59f98
if [ $1 -ge 1 ] ; then
0e59f98
    # Package upgrade, not uninstall
0e59f98
    /bin/systemctl try-restart aprsd.service >/dev/null 2>&1 || :
5dc08fc
fi
5dc08fc
0e59f98
%triggerun -- aprsd < 2.2.5-15.6.3
0e59f98
# Save the current service runlevel info
0e59f98
# User must manually run systemd-sysv-convert --apply aprsd
0e59f98
# to migrate them to systemd targets
0e59f98
/usr/bin/systemd-sysv-convert --save aprsd >/dev/null 2>&1 ||:
0e59f98
0e59f98
# Run these because the SysV package being removed won't do them
0e59f98
/sbin/chkconfig --del aprsd >/dev/null 2>&1 || :
0e59f98
/bin/systemctl try-restart aprsd.service >/dev/null 2>&1 || :
0e59f98
0e59f98
0e59f98
5dc08fc
%files
5dc08fc
%{_bindir}/aprsd
5dc08fc
%{_bindir}/aprspass
0e59f98
%{_unitdir}/aprsd.service
5dc08fc
%dir %{_sysconfdir}/aprsd
d80b68a
%dir %{_localstatedir}/log/aprsd
5dc08fc
%config(noreplace) %{_sysconfdir}/aprsd/*
d80b68a
%config(noreplace) %{_sysconfdir}/logrotate.d/aprsd
5dc08fc
%doc AUTHORS
5dc08fc
%doc COPYING
5dc08fc
%doc ChangeLog
5dc08fc
%doc README
5dc08fc
%doc doc/aprsddoc.html
5dc08fc
%doc doc/ports.html
5dc08fc
%doc doc/q.html
5dc08fc
%doc doc/qalgorithm.html
5dc08fc
5dc08fc
%changelog
0b9e11c
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.5-15.6.14
0b9e11c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
0b9e11c
d1975e0
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.5-15.6.13
d1975e0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
d1975e0
80d80df
* Fri Oct 30 2015 Richard Shaw <hobbes1069@gmail.com> - 2.2.5-15.6.12
80d80df
- Rebuild for updated libax25.
80d80df
4ba6e1e
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-15.6.11
4ba6e1e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
4ba6e1e
beeb763
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.2.5-15.6.10
beeb763
- Rebuilt for GCC 5 C++11 ABI change
beeb763
b332f19
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-15.6.9
b332f19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
b332f19
df19ad0
* Tue Jun 10 2014 Lucian Langa <cooly@gnome.eu.org> - 2.2.5-15.6.8
df19ad0
- fix build break - fixes #1105962
df19ad0
- fix bogus dates
df19ad0
- spec file cleanups
df19ad0
5307261
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-15.6.7
5307261
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
5307261
142a28f
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-15.6.6
142a28f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
142a28f
6451fa9
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-15.6.5
6451fa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
6451fa9
60c33c2
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-15.6.4
60c33c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
60c33c2
0e59f98
* Thu Feb 16 2012 Jon Ciesla <limburgher@gmail.com> - 2.2.5-15.6.3
0e59f98
- Migrate to systemd, BZ 754399.
0e59f98
6a03dd6
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-15.6.2
6a03dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
6a03dd6
6fe1536
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-15.6.1
6fe1536
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
6fe1536
bc59ed2
* Fri Sep 11 2009 Lucian Langa <cooly@gnome.eu.org> - 2.2.5-15.6
bc59ed2
 - fix wrong version bumps
bc59ed2
 - add patch from Alan Crosswell fix 'AX.25 sockets are not supported by this
bc59ed2
 executable'
bc59ed2
e4fb635
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-15.5.2
e4fb635
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
e4fb635
739355c
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-15.5.1
739355c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
739355c
d955169
* Sat Aug 23 2008 Lucian Langa <cooly@gnome.eu.org> - 2.2.5-15.5
bf05ca8
- fix rh bug 458817
bf05ca8
df19ad0
* Sat Aug  2 2008 Lucian Langa <cooly@gnome.eu.org> - 2.2.5-15.4
64bbf2a
- logrotate warning fixes
64bbf2a
df19ad0
* Sat Mar  8 2008 Lucian Langa <cooly@gnome.eu.org> - 2.2.5-15.3
d80b68a
- Patched to localstatedir
d80b68a
- Added logrotation support
d80b68a
5dc08fc
* Fri Feb 22 2008 Lucian Langa <cooly@gnome.eu.org> - 2.2.5-15.2
5dc08fc
- Patched homedir to obey default sysconfdir
5dc08fc
- Patched to compile for gcc-4.3
5dc08fc
- Misc cleanups
5dc08fc
5dc08fc
* Thu Feb 21 2008 Lucian Langa <cooly@gnome.eu.org> - 2.2.5-15.1
5dc08fc
- Initial spec file created
5dc08fc