106 lines
No EOL
3.5 KiB
RPMSpec
106 lines
No EOL
3.5 KiB
RPMSpec
%define _hardened_build 1
|
|
|
|
Name: ahcpd
|
|
Version: 0.53
|
|
Release: 9%{?dist}
|
|
Summary: Ad-hoc network configuration daemon
|
|
|
|
Group: System Environment/Base
|
|
License: MIT
|
|
URL: http://www.pps.univ-paris-diderot.fr/~jch/software/ahcp/
|
|
Source0: http://www.pps.univ-paris-diderot.fr/~jch/software/files/%{name}-%{version}.tar.gz
|
|
Source1: %{name}.service
|
|
Source2: %{name}.conf
|
|
Source3: %{name}.logrotate
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
BuildRequires: systemd
|
|
Requires(post): systemd-units
|
|
Requires(preun): systemd-units
|
|
Requires(postun): systemd-units
|
|
|
|
%description
|
|
AHCP is a configuration protocol that can replace DHCP on networks without
|
|
transitive connectivity, such as mesh networks.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="%{?__global_ldflags}" %{?_smp_mflags}
|
|
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
install -Dpm 755 ahcpd $RPM_BUILD_ROOT%{_sbindir}/ahcpd
|
|
install -Dpm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
|
|
install -Dpm 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/ahcpd.conf
|
|
install -Dpm 644 ahcpd.man $RPM_BUILD_ROOT/%{_mandir}/man8/ahcpd.8
|
|
install -Dp -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ahcpd
|
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/ahcpd/leases/
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ahcp/
|
|
install -Dpm 755 ahcp-config.sh $RPM_BUILD_ROOT%{_sysconfdir}/ahcp/ahcp-config.sh
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%post
|
|
if [ $1 -eq 1 ] ; then
|
|
# Initial installation
|
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
fi
|
|
|
|
%preun
|
|
if [ $1 -eq 0 ] ; then
|
|
# Package removal, not upgrade
|
|
/bin/systemctl --no-reload disable ahcpd.service > /dev/null 2>&1 || :
|
|
/bin/systemctl stop ahcpd.service > /dev/null 2>&1 || :
|
|
fi
|
|
|
|
%postun
|
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
if [ $1 -ge 1 ] ; then
|
|
# Package upgrade, not uninstall
|
|
/bin/systemctl try-restart ahcpd.service >/dev/null 2>&1 || :
|
|
fi
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc CHANGES LICENCE README
|
|
%{_sbindir}/ahcpd
|
|
%{_unitdir}/%{name}.service
|
|
%config(noreplace) %{_sysconfdir}/ahcpd.conf
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/ahcpd
|
|
%{_mandir}/man8/ahcpd.8.gz
|
|
%ghost %attr(0600,root,root) %{_localstatedir}/log/ahcpd.log
|
|
%config(noreplace) %{_sysconfdir}/ahcp/
|
|
|
|
%changelog
|
|
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.53-9
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.53-8
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
* Fri Feb 21 2014 Jon Ciesla <limburgher@gmail.com> - 0.53-7
|
|
- Add ahcp-config.sh, BZ 1035710.
|
|
|
|
* Mon Aug 05 2013 Jon Ciesla <limburgher@gmail.com> - 0.53-6
|
|
- Add BuildRequires: systemd to fix FTBFS, BZ 991958.
|
|
|
|
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.53-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
* Thu Apr 25 2013 Jon Ciesla <limburgher@gmail.com> - 0.53-4
|
|
- Add LDFLAGS to enable PIE, BZ 955446.
|
|
|
|
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.53-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
|
* Mon Aug 27 2012 Jon Ciesla <limburgher@gmail.com> - 0.53-2
|
|
- Dropped unneeded parts for review.
|
|
- Added log, logrotate, state file, and default config.
|
|
|
|
* Tue Aug 21 2012 Jon Ciesla <limburgher@gmail.com> - 0.53-1
|
|
- Initial package. |