# 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: Routing daemon for the ampr network Name: ampr-ripd Version: 1.11 Release: 1%{?dist} License: GPLv2+ Group: Applications/Communications URL: http://www.yo2loj.ro/hamprojects/ BuildRequires: dos2unix, systemd Requires(post): systemd Requires(preun): systemd Requires(postun): systemd Source0: http://www.yo2loj.ro/hamprojects/%{name}-%{version}.tgz Source1: ampr-ripd.service Patch0: ampr-ripd-1.11-install-fix.patch Patch1: ampr-ripd-1.11-examples-noshebang.patch Patch2: ampr-ripd-1.11-pidfile.patch %description Routing daemon written in C similar to Hessu's rip44d including optional resending of RIPv2 broadcasts for router injection. %prep %setup -qc %patch0 -p1 -b .install-fix %patch1 -p1 -b .examples-noshebang %patch2 -p1 -b .pidfile %build 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}/%{name}.service # Examples install -Dd %{buildroot}%{_datadir}/%{name} install -Dpm 644 -t %{buildroot}%{_datadir}/%{name} ampr-run.sh find_pass.sh %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %doc COPYING manual.txt %{_sbindir}/ampr-ripd %{_datadir}/%{name} %{_unitdir}/%{name}.service %changelog * Tue Jul 22 2014 Jaroslav Škarvada - 1.11-1 - Initial release