]> git.pld-linux.org Git - packages/dhcp.git/blobdiff - dhcp.spec
- updated to final 3.0 (Epoch: 2).
[packages/dhcp.git] / dhcp.spec
index 3bf78cf7d6920195e97b70eae889e9d1a889a600..c8780ec030912d146823dd1ed3a0456263cafa73 100644 (file)
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -1,39 +1,46 @@
 Summary:       DHCP Server 
 Summary(pl):   Serwer DHCP 
 Name:          dhcp
-Version:       3.0b1pl13
-Release:       2
-Serial:                1
+Version:       3.0
+Release:       1
+Epoch:         2
+Vendor:                ISC
+License:       Distributable
 Group:         Networking/Daemons
-Group(de):     Sieciowe/Serwery
-Copyright:     distributable
-Vendor:         ISC
+Group(de):     Netzwerkwesen/Server
+Group(pl):     Sieciowe/Serwery
 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:     /tmp/%{name}-%{version}-root
+Prereq:                rc-scripts >= 0.2.0
 Prereq:                /sbin/chkconfig
-Requires:      rc-scripts
+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
@@ -44,40 +51,53 @@ Klient DHCP (Dynamic Host Configuration Protocol).
 
 %package relay
 Summary:       DHCP Relay Agent
-Summary(pl):   Agent przekazywania DHCP
+Summary(pl):   Agent przekazywania informacji DHCP
 Group:         Networking/Daemons
-Group(de):     Sieciowe/Serwery
+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).
+Agent przekazywania DHCP (Dynamic Host Configuration Protocol) miêdzy
+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" DEBUG="" \
-       VARDB="/var/state/%{name}"
+%{__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}} \
-       $RPM_BUILD_ROOT{/var/state/%{name},/etc/{rc.d/init.d,sysconfig}}
-
-make install \
-       CLIENTBINDIR=$RPM_BUILD_ROOT/sbin \
-       BINDIR=$RPM_BUILD_ROOT%{_sbindir} \
-       ADMMANDIR=$RPM_BUILD_ROOT%{_mandir}/man8 \
+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 \
+       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
@@ -85,14 +105,22 @@ install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
 
-gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
-         doc/* README RELNOTES 
+install client/scripts/linux $RPM_BUILD_ROOT%{_sysconfdir}/dhclient-script
 
-touch $RPM_BUILD_ROOT/var/state/%{name}/{dhcpd,dhclient}.leases
+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/state/%{name}/dhcpd.leases
+touch /var/lib/%{name}/dhcpd.leases
+
+if [ ! -d /var/lib/dhcp ]; then
+       install -d /var/lib/dhcp
+fi
 
 if [ -f /var/lock/subsys/dhcpd ]; then
        /etc/rc.d/init.d/dhcpd restart >&2
@@ -101,12 +129,19 @@ else
 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
+if [ -d /var/lib/dhcp ]; then
+       install -d /var/lib/dhcp
 fi
 
 %preun
@@ -119,14 +154,19 @@ fi
 
 %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)
@@ -136,14 +176,15 @@ rm -rf $RPM_BUILD_ROOT
 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
 %attr(755,root,root) %{_sbindir}/dhcpd
 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
-%attr(750,root,root) %dir /var/state/%{name}
-%ghost /var/state/%{name}/dhcpd.leases
+%attr(750,root,root) %dir /var/lib/%{name}
+%ghost /var/lib/%{name}/dhcpd.leases
 
 %files client
 %defattr(644,root,root,755)
 %attr(755,root,root) /sbin/dhclient
+%attr(755,root,root) %{_sysconfdir}/dhclient-script
 %{_mandir}/man[58]/dhclient*
-%ghost /var/state/%{name}/dhclient.leases
+%ghost /var/lib/%{name}/dhclient.leases
 
 %files relay
 %defattr(644,root,root,755)
This page took 1.477685 seconds and 4 git commands to generate.