# # $Id$ # Summary: dploy.org DHCP interface tools Summary(fr): Outils d'interface DHCP pour dploy.org Name: PBPKG Version: PBVER Release: PBTAGPBSUF License: GPL Group: PBGRP Url: PBURL Source: PBSRC BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) Requires: dploy-common, dhcp-server, sudo, perl, PBDEP %description PBDESC %description -l fr Outils d'interface DHCP pour dploy.org %prep %setup -q %install %{__rm} -rf $RPM_BUILD_ROOT export DESTDIR=$RPM_BUILD_ROOT export PREFIX=%{_exec_prefix} export CONFDIR=%{_sysconfdir}/PBPROJ ./install.sh %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc ChangeLog #%doc INSTALL COPYING README AUTHORS NEWS %{_bindir}/* %post # Include our configuration file in std dhcp.conf file grep -qE '^include "%{_sysconfdir}/PBPROJ/dhcpd.conf";' /etc/dhcpd.conf if [ $? -ne 0 ]; then echo 'include "%{_sysconfdir}/PBPROJ/dhcpd.conf";' >> /etc/dhcpd.conf fi # Include dploy in sudoers grep -qE '^dploy ' /etc/sudoers if [ $? -ne 0 ]; then echo 'dploy ALL=NOPASSWD: /etc/init.d/dhcpd ?*' >> /etc/sudoers fi %changelog PBLOG