uronode/uronode.spec
Jaroslav Škarvada 4a500a969b New version
Resolves: rhbz#1326416
- Switched to tgz suffix which seems to be the default
- Dropped override-dirs-in-unattended-install patch (upstreamed)
- Updated install-fix patch
- Optimized patch numbering
2016-04-12 18:44:09 +02:00

158 lines
5 KiB
RPMSpec

# hardened build if not overriden
%{!?_hardened_build:%global _hardened_build 1}
%if %{?_hardened_build}%{!?_hardened_build:0}
%global cflags_harden -fpie
%global ldflags_harden -pie -z relro -z now
%endif
Summary: Alternative packet radio system for Linux
Name: uronode
Version: 2.5.1
Release: 1%{?dist}
License: GPLv2+
Group: Applications/Communications
URL: http://uronode.sourceforge.net
BuildRequires: zlib-devel, libax25-devel, systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
Source1: flexd.service
Source2: uronode@.service
Source3: uronode.socket
Source4: uronode.xinetd
Source5: uronode-README.fedora
# Sent upstream
Patch0: uronode-2.5.1-install-fix.patch
%description
URONode is an alternative packet radio system for Linux. It supports
cross-port digipeating, automatic importing of flexnet routing,
various IP functions, and ANSI colors.
%prep
%setup -q
%patch0 -p1 -b .install-fix
# Copy Fedora readme into place
cp -p %{SOURCE5} README.fedora
# Removing bundled libax25, using system one.
rm -rf include
%build
export NON_INTERACTIVE=1
export ETC_DIR=/etc/ax25
export SBIN_DIR=/usr/sbin
export BIN_DIR=/usr/bin
export LIB_DIR=/usr/lib
export DATA_DIR=/usr/share
export MAN_DIR=$DATA_DIR/man
export VAR_DIR=/var
./configure
make %{?_smp_mflags} CFLAGS="%{optflags} %{?cflags_harden}" LDFLAGS="%{?__global_ldflags} %{?ldflags_harden}"
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
# Systemd
install -Dpm 644 %{SOURCE1} %{buildroot}%{_unitdir}/flexd.service
install -Dpm 644 %{SOURCE2} %{buildroot}%{_unitdir}/uronode@.service
install -Dpm 644 %{SOURCE3} %{buildroot}%{_unitdir}/uronode.socket
# xinetd
install -Dpm 644 %{SOURCE4} %{buildroot}%{_datadir}/%{name}/xinetd.d/uronode
# ghost files
touch %{buildroot}/%{_var}/lib/flexd/destinations
# assert for case upstream would add default content
[ -s %{buildroot}%{_var}/lib/flexd/gateways ] && exit 1
[ -s %{buildroot}%{_var}/log/uronode/lastlog ] && exit 1
[ -s %{buildroot}%{_var}/lib/uronode/loggedin ] && exit 1
%post
%systemd_post flexd.service uronode.socket
%preun
%systemd_preun flexd.service uronode.socket
%postun
%systemd_postun_with_restart flexd.service uronode.socket
%files
%doc README.fedora README URONode.his FAQ COLORS CHANGES.1 CHANGES.2 COPYING
%{_sbindir}/*
%{_mandir}/*/*
%config(noreplace) %{_sysconfdir}/ax25/flexd.conf
%config(noreplace) %{_sysconfdir}/ax25/uronode.conf
%config(noreplace) %{_sysconfdir}/ax25/uronode.info
%config(noreplace) %{_sysconfdir}/ax25/uronode.motd
%config(noreplace) %{_sysconfdir}/ax25/uronode.perms
%config(noreplace) %{_sysconfdir}/ax25/uronode.routes
%config(noreplace) %{_sysconfdir}/ax25/uronode.users
%{_datadir}/%{name}/xinetd.d/uronode
%{_unitdir}/flexd.service
%{_unitdir}/uronode@.service
%{_unitdir}/uronode.socket
%{_datadir}/%{name}
%dir %{_var}/log/uronode
%dir %{_var}/lib/flexd
%dir %{_var}/lib/uronode
%ghost %{_var}/lib/uronode/loggedin
%ghost %{_var}/lib/flexd/gateways
%ghost %{_var}/log/uronode/lastlog
%ghost %{_var}/lib/flexd/destinations
%changelog
* Tue Apr 12 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 2.5.1-1
- New version
Resolves: rhbz#1326416
- Switched to tgz suffix which seems to be the default
- Dropped override-dirs-in-unattended-install patch (upstreamed)
- Updated install-fix patch
- Optimized patch numbering
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Oct 30 2015 Richard Shaw <hobbes1069@gmail.com> 3.2.1-6
- Rebuilt for updated libax25.
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Apr 7 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 2.3.1-4
- Fixed flexd tmp path
* Wed Apr 1 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 2.3.1-3
- Fixed mheard.dat location and not provided it
* Tue Feb 17 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 2.3.1-2
- Pointed URLs to sourceforge.net
* Mon Feb 16 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 2.3.1-1
- New version
- Rebased install-fix patch
- Allowed to override installation directories in configure script
(by override-dirs-in-unattended-install patch)
- Dropped downstream license file, license file provided by upstream
- Dropped non-interactive-configure patch (upstreamed)
- Dropped no-md2 patch (upstreamed)
- Dropped ax25-build-fix patch (upstreamed)
* Wed Dec 3 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 2.2-1
- New version
- Updated ax25-build-fix patch, now flexd.c is affected
- Dropped flexd-pidfile, ipv6 patches (all upstreamed)
- Dropped md2 code (cherry-picked from upstream, by no-md2 patch)
- Fixed debuginfo
- Switched description to American English
- Switched to systemd socket activation from xinetd (xinetd is optional)
* Wed Jul 30 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 2.1-2
- Fixed FHS issues related to var directory
* Tue Jul 15 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 2.1-1
- Initial release