source: ProjectBuilder/projects/dploy/pbconf/devel/dploy-dhcp/rpm/dploy-dhcp.spec@ 421

Last change on this file since 421 was 421, checked in by Bruno Cornec, 16 years ago
  • BuildArch is noarch for dploy
  • Removes vm entries from dploy.pb for 0.9.2 comlpiance
File size: 1.2 KB
Line 
1#
2# $Id$
3#
4
5Summary: dploy.org DHCP interface tools
6Summary(fr): Outils d'interface DHCP pour dploy.org
7
8Name: PBPKG
9Version: PBVER
10Release: PBTAGPBSUF
11License: GPL
12Group: PBGRP
13Url: PBURL
14Source: PBSRC
15BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
16BuildArch: noarch
17Requires: dploy-common, dhcp-server, sudo, perl, PBDEP
18
19%description
20PBDESC
21
22%description -l fr
23Outils d'interface DHCP pour dploy.org
24
25%prep
26%setup -q
27
28%install
29%{__rm} -rf $RPM_BUILD_ROOT
30export DESTDIR=$RPM_BUILD_ROOT
31export PREFIX=%{_exec_prefix}
32export CONFDIR=%{_sysconfdir}/PBPROJ
33./install.sh
34
35%clean
36%{__rm} -rf $RPM_BUILD_ROOT
37
38%files
39%defattr(-,root,root)
40%doc ChangeLog
41#%doc INSTALL COPYING README AUTHORS NEWS
42%{_bindir}/*
43
44%post
45# Include our configuration file in std dhcp.conf file
46grep -qE '^include "%{_sysconfdir}/PBPROJ/dhcpd.conf";' /etc/dhcpd.conf
47if [ $? -ne 0 ]; then
48 echo 'include "%{_sysconfdir}/PBPROJ/dhcpd.conf";' >> /etc/dhcpd.conf
49fi
50
51# Include dploy in sudoers
52grep -qE '^dploy ' /etc/sudoers
53if [ $? -ne 0 ]; then
54 echo 'dploy ALL=NOPASSWD: /etc/init.d/dhcpd ?*' >> /etc/sudoers
55fi
56
57%changelog
58PBLOG
Note: See TracBrowser for help on using the repository browser.