]> git.pld-linux.org Git - packages/dhcp.git/blob - dhcp.spec
- updated to final 3.0 (Epoch: 2).
[packages/dhcp.git] / dhcp.spec
1 Summary:        DHCP Server 
2 Summary(pl):    Serwer DHCP 
3 Name:           dhcp
4 Version:        3.0
5 Release:        1
6 Epoch:          2
7 Vendor:         ISC
8 License:        Distributable
9 Group:          Networking/Daemons
10 Group(de):      Netzwerkwesen/Server
11 Group(pl):      Sieciowe/Serwery
12 Source0:        ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
13 Source1:        %{name}.init
14 Source2:        %{name}-relay.init
15 Source3:        %{name}-relay.sysconfig
16 Source4:        %{name}d.conf.sample
17 Source5:        %{name}.sysconfig
18 BuildRequires:  groff
19 Prereq:         rc-scripts >= 0.2.0
20 Prereq:         /sbin/chkconfig
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
25 individual devices on an IP network to get their own network
26 configuration information (IP address, subnetmask, broadcast address,
27 etc.) from a DHCP server. The overall purpose of DHCP is to make it
28 easier to administer a large network.
29
30 %description -l pl
31 Serwer DHCP (Dynamic Host Configuration Protocol).
32
33 DHCP to protokó³ pozwalaj±cy urz±dzeniom pracuj±cym w sieci IP na
34 pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu
35 rozg³oszeniowego itp.) z serwera DHCP. U³atwia on administrowanie
36 du¿ymi sieciami IP.
37
38 %package client
39 Summary:        DHCP Client
40 Summary(pl):    Klient DHCP 
41 Group:          Networking/Daemons
42 Group(de):      Netzwerkwesen/Server
43 Group(pl):      Sieciowe/Serwery
44 Obsoletes:      pump
45
46 %description client
47 Dynamic Host Configuration Protocol Client.
48
49 %description -l pl client
50 Klient DHCP (Dynamic Host Configuration Protocol).
51
52 %package relay
53 Summary:        DHCP Relay Agent
54 Summary(pl):    Agent przekazywania informacji DHCP
55 Group:          Networking/Daemons
56 Group(de):      Netzwerkwesen/Server
57 Group(pl):      Sieciowe/Serwery
58 Prereq:         rc-scripts >= 0.2.0
59 Prereq:         /sbin/chkconfig
60
61 %description relay
62 Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
63 with DHCP clients to "relay" their requests to a subnet that has a
64 DHCP server on it. Because DHCP packets can be broadcast, they will
65 not be routed off of the local subnet. The DHCP relay takes care of
66 this for the client.
67
68 %description -l pl relay
69 Agent przekazywania DHCP (Dynamic Host Configuration Protocol) miêdzy
70 podsieciami. Poniewa¿ komunikaty DHCP mog± byæ przekazywane w formie
71 rozg³oszeniowej, bez tego agenta nie zostan± przerutowane do innej 
72 podsieci.
73
74 %prep
75 %setup -q
76 install %{SOURCE4} .
77
78 %build
79 # Notice: this is not autoconf configure!!!!!!!
80 #         do not change it to %%configure
81 ./configure
82
83 %{__make} COPTS="%{rpmcflags} \
84         -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
85         -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\"" \
86         DEBUG="" VARDB="/var/lib/%{name}"
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_bindir},%{_mandir}/man{5,8}} \
91         $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
92
93 %{__make} install \
94         DESTDIR="$RPM_BUILD_ROOT" \
95         CLIENTBINDIR="/sbin" \
96         BINDIR="%{_sbindir}" \
97         ADMMANDIR="%{_mandir}/man8" \
98         ADMMANEXT=.8 \
99         FFMANDIR="%{_mandir}/man5" \
100         VARDB="/var/lib/%{name}" \
101         FFMANEXT=.5
102
103 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
104 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
105 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
106 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
107
108 install client/scripts/linux $RPM_BUILD_ROOT%{_sysconfdir}/dhclient-script
109
110 gzip -9nf doc/* README RELNOTES 
111
112 touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %post
118 /sbin/chkconfig --add dhcpd
119 touch /var/lib/%{name}/dhcpd.leases
120
121 if [ ! -d /var/lib/dhcp ]; then
122         install -d /var/lib/dhcp
123 fi
124
125 if [ -f /var/lock/subsys/dhcpd ]; then
126         /etc/rc.d/init.d/dhcpd restart >&2
127 else
128         echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
129 fi
130
131 %post relay
132 /sbin/chkconfig --add dhcp-relay
133 if [ -f /var/lock/subsys/dhcrelay ]; then
134         mv /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
135 fi
136 if [ -f /var/lock/subsys/dhcp-relay ]; then
137         /etc/rc.d/init.d/dhcp-relay restart >&2
138 else
139         echo "Run \"/etc/rc.d/init.d/dhcp-relay start\" to start dhcrelay daemon."
140 fi
141
142 %post client
143 if [ -d /var/lib/dhcp ]; then
144         install -d /var/lib/dhcp
145 fi
146
147 %preun
148 if [ "$1" = "0" ];then
149         if [ -f /var/lock/subsys/dhcpd ]; then
150                 /etc/rc.d/init.d/dhcpd stop >&2
151         fi
152         /sbin/chkconfig --del dhcpd
153 fi
154
155 %preun relay
156 if [ "$1" = "0" ];then
157         if [ -f /var/lock/subsys/dhcp-relay ]; then
158                 /etc/rc.d/init.d/dhcp-relay stop >&2
159         fi
160         /sbin/chkconfig --del dhcp-relay
161 fi
162
163 %triggerpostun -- dhcp < 3.0
164 if [ `grep ddns-update-style /etc/dhcpd.conf` = "" ]; then
165         echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
166         echo "" >> /etc/dhcpd.conf.tmp
167         cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp
168         mv -f /etc/dhcpd.conf.tmp /etc/dhcpd.conf
169 fi
170
171 %files
172 %defattr(644,root,root,755)
173 %doc doc/* README.gz RELNOTES.gz dhcpd.conf.sample
174 %{_mandir}/man5/dhcp*
175 %{_mandir}/man8/dhcp*
176 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
177 %attr(755,root,root) %{_sbindir}/dhcpd
178 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
179 %attr(750,root,root) %dir /var/lib/%{name}
180 %ghost /var/lib/%{name}/dhcpd.leases
181
182 %files client
183 %defattr(644,root,root,755)
184 %attr(755,root,root) /sbin/dhclient
185 %attr(755,root,root) %{_sysconfdir}/dhclient-script
186 %{_mandir}/man[58]/dhclient*
187 %ghost /var/lib/%{name}/dhclient.leases
188
189 %files relay
190 %defattr(644,root,root,755)
191 %{_mandir}/man8/dhcrelay*
192 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
193 %attr(755,root,root) %{_sbindir}/dhcrelay
194 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
This page took 0.070447 seconds and 4 git commands to generate.