Summary: DHCP Server
Summary(pl): Serwer DHCP
Name: dhcp
-Version: 3.0b1pl13
-Release: 3
-Serial: 1
+Version: 3.0
+Release: 1
+Epoch: 2
+Vendor: ISC
+License: Distributable
Group: Networking/Daemons
+Group(de): Netzwerkwesen/Server
Group(pl): Sieciowe/Serwery
-Copyright: distributable
-Vendor: ISC
Source0: ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
-Source1: dhcp.init
-Source2: dhcp-relay.init
-Source3: dhcp-relay.sysconfig
-Source4: dhcpd.conf.sample
-Source5: dhcp.sysconfig
+Source1: %{name}.init
+Source2: %{name}-relay.init
+Source3: %{name}-relay.sysconfig
+Source4: %{name}d.conf.sample
+Source5: %{name}.sysconfig
BuildRequires: groff
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Prereq: rc-scripts >= 0.2.0
Prereq: /sbin/chkconfig
-Requires: rc-scripts >= 0.2.0
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
-individual devices on an IP network to get their own network configuration
-information (IP address, subnetmask, broadcast address, etc.) from a DHCP
-server. The overall purpose of DHCP is to make it easier to administer a
-large network.
+individual devices on an IP network to get their own network
+configuration information (IP address, subnetmask, broadcast address,
+etc.) from a DHCP server. The overall purpose of DHCP is to make it
+easier to administer a large network.
%description -l pl
Serwer DHCP (Dynamic Host Configuration Protocol).
+DHCP to protokó³ pozwalaj±cy urz±dzeniom pracuj±cym w sieci IP na
+pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu
+rozg³oszeniowego itp.) z serwera DHCP. U³atwia on administrowanie
+du¿ymi sieciami IP.
+
%package client
Summary: DHCP Client
Summary(pl): Klient DHCP
Group: Networking/Daemons
-Group(de): Sieciowe/Serwery
+Group(de): Netzwerkwesen/Server
+Group(pl): Sieciowe/Serwery
Obsoletes: pump
%description client
Summary: DHCP Relay Agent
Summary(pl): Agent przekazywania informacji DHCP
Group: Networking/Daemons
-Group(de): Sieciowe/Serwery
-Requires: rc-scripts >= 0.2.0
+Group(de): Netzwerkwesen/Server
+Group(pl): Sieciowe/Serwery
+Prereq: rc-scripts >= 0.2.0
+Prereq: /sbin/chkconfig
%description relay
-Dynamic Host Configuration Protocol Relay Agent.
+Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
+with DHCP clients to "relay" their requests to a subnet that has a
+DHCP server on it. Because DHCP packets can be broadcast, they will
+not be routed off of the local subnet. The DHCP relay takes care of
+this for the client.
%description -l pl relay
Agent przekazywania DHCP (Dynamic Host Configuration Protocol) miêdzy
-podsieciami.
+podsieciami. Poniewa¿ komunikaty DHCP mog± byæ przekazywane w formie
+rozg³oszeniowej, bez tego agenta nie zostan± przerutowane do innej
+podsieci.
%prep
%setup -q
-
-cp %{SOURCE4} .
+install %{SOURCE4} .
%build
-LDFLAGS="-s" ; export LDFLAGS
-%configure
+# Notice: this is not autoconf configure!!!!!!!
+# do not change it to %%configure
+./configure
-make COPTS="$RPM_OPT_FLAGS -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
+%{__make} COPTS="%{rpmcflags} \
+ -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
-D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\"" \
DEBUG="" VARDB="/var/lib/%{name}"
%install
rm -rf $RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_mandir}/man{5,8}} \
+install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_bindir},%{_mandir}/man{5,8}} \
$RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
-make install \
- CLIENTBINDIR=$RPM_BUILD_ROOT/sbin \
- BINDIR=$RPM_BUILD_ROOT%{_sbindir} \
- ADMMANDIR=$RPM_BUILD_ROOT%{_mandir}/man8 \
+%{__make} install \
+ DESTDIR="$RPM_BUILD_ROOT" \
+ CLIENTBINDIR="/sbin" \
+ BINDIR="%{_sbindir}" \
+ ADMMANDIR="%{_mandir}/man8" \
ADMMANEXT=.8 \
- FFMANDIR=$RPM_BUILD_ROOT%{_mandir}/man5 \
+ FFMANDIR="%{_mandir}/man5" \
+ VARDB="/var/lib/%{name}" \
FFMANEXT=.5
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
install client/scripts/linux $RPM_BUILD_ROOT%{_sysconfdir}/dhclient-script
-gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
- doc/* README RELNOTES
+gzip -9nf doc/* README RELNOTES
touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%post
/sbin/chkconfig --add dhcpd
touch /var/lib/%{name}/dhcpd.leases
fi
%post relay
-/sbin/chkconfig --add dhcrelay
-
+/sbin/chkconfig --add dhcp-relay
if [ -f /var/lock/subsys/dhcrelay ]; then
- /etc/rc.d/init.d/dhcrelay restart >&2
+ mv /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
+fi
+if [ -f /var/lock/subsys/dhcp-relay ]; then
+ /etc/rc.d/init.d/dhcp-relay restart >&2
else
- echo "Run \"/etc/rc.d/init.d/dhcrelay start\" to start dhcrelay daemon."
+ echo "Run \"/etc/rc.d/init.d/dhcp-relay start\" to start dhcrelay daemon."
fi
%post client
%preun relay
if [ "$1" = "0" ];then
- if [ -f /var/lock/subsys/dhcrelay ]; then
- /etc/rc.d/init.d/dhrelay stop >&2
+ if [ -f /var/lock/subsys/dhcp-relay ]; then
+ /etc/rc.d/init.d/dhcp-relay stop >&2
fi
- /sbin/chkconfig --del dhcrelay
+ /sbin/chkconfig --del dhcp-relay
fi
-%clean
-rm -rf $RPM_BUILD_ROOT
+%triggerpostun -- dhcp < 3.0
+if [ `grep ddns-update-style /etc/dhcpd.conf` = "" ]; then
+ echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
+ echo "" >> /etc/dhcpd.conf.tmp
+ cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp
+ mv -f /etc/dhcpd.conf.tmp /etc/dhcpd.conf
+fi
%files
%defattr(644,root,root,755)