]> git.pld-linux.org Git - packages/dhcp.git/blob - dhcp.spec
- files fixed - builds now
[packages/dhcp.git] / dhcp.spec
1 Summary:        DHCP Server
2 Summary(es):    Servidor DHCP (Protocolo de configuración dinámica de hosts)
3 Summary(pl):    Serwer DHCP
4 Summary(pt_BR): Servidor DHCP (Protocolo de configuração dinâmica de hosts)
5 Name:           dhcp
6 Version:        3.0
7 Release:        4
8 Epoch:          2
9 Vendor:         ISC
10 License:        distributable
11 Group:          Networking/Daemons
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 Provides:       dhcpd
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
26 individual devices on an IP network to get their own network
27 configuration information (IP address, subnetmask, broadcast address,
28 etc.) from a DHCP server. The overall purpose of DHCP is to make it
29 easier to administer a large network.
30
31 %description -l es
32 DHCP permite que hosts en una red TCP/IP soliciten y tengan sus
33 direcciones IP alocadas dinámicamente, permite también descubrir
34 información sobre la red en que están conectados. BOOTP provee una
35 funcionalidad similar, con ciertas restricciones. Este servidor
36 también las atiende. Esta versión aún está considerada como un
37 software BETA.
38
39 %description -l pl
40 Serwer DHCP (Dynamic Host Configuration Protocol).
41
42 DHCP to protokó³ pozwalaj±cy urz±dzeniom pracuj±cym w sieci IP na
43 pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu
44 rozg³oszeniowego itp.) z serwera DHCP. U³atwia on administrowanie
45 du¿ymi sieciami IP.
46
47 %description -l pt_BR
48 DHCP permite que hosts numa rede TCP/IP requisitem e tenham seus
49 endereços IP alocados dinamicamente, permite também descobrir
50 informações sobre a rede em que estão conectados. BOOTP provê uma
51 funcionalidade similar, com certas restrições. Este servidor também
52 atende aquelas requisições. Esta versão é ainda considerada um
53 software BETA.
54
55 %package client
56 Summary:        DHCP Client
57 Summary(pl):    Klient DHCP
58 Group:          Networking/Daemons
59 Obsoletes:      pump
60
61 %description client
62 Dynamic Host Configuration Protocol Client.
63
64 %description client -l pl
65 Klient DHCP (Dynamic Host Configuration Protocol).
66
67 %package relay
68 Summary:        DHCP Relay Agent
69 Summary(pl):    Agent przekazywania informacji DHCP
70 Group:          Networking/Daemons
71 Prereq:         rc-scripts >= 0.2.0
72 Prereq:         /sbin/chkconfig
73
74 %description relay
75 Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
76 with DHCP clients to "relay" their requests to a subnet that has a
77 DHCP server on it. Because DHCP packets can be broadcast, they will
78 not be routed off of the local subnet. The DHCP relay takes care of
79 this for the client.
80
81 %description relay -l pl
82 Agent przekazywania DHCP (Dynamic Host Configuration Protocol) miêdzy
83 podsieciami. Poniewa¿ komunikaty DHCP mog± byæ przekazywane w formie
84 rozg³oszeniowej, bez tego agenta nie zostan± przerutowane do innej
85 podsieci.
86
87 %package devel
88 Summary:        DHCP development includes and libs
89 Summary(pl):    Pliki nag³ówkowe i biblioteki dla oprogramowania DHCP
90 Group:          Development/Libraries
91
92 %description devel
93 Includes OMAPI and dhcptl libraries.
94
95 OMAPI is an programming layer designed for controlling remote
96 applications, and for querying them for their state. It is currently
97 used by the ISC DHCP server.
98
99 The dhcpctl set of functions provide an API that can be used to
100 communicate with and manipulate a running ISC DHCP server.
101
102 %description devel -l pl
103 Zawiera biblioteki OMAPI oraz dhcpctl.
104
105 OMAPI to warstwa programowa stworzona do kontroli zdalnych aplikacji i
106 odpytywania o ich stan. Aktualnie jest u¿ywana przez serwer ISC DHCP.
107
108 dhcpctl to zbiór funkcji tworz±cych API, które mo¿e byæ u¿ywane do
109 komunikacji z dzia³aj±cym serwerem ISC DHCP i jego kontroli.
110
111 %prep
112 %setup -q
113 install %{SOURCE4} .
114
115 %build
116 # Notice: this is not autoconf configure!!!!!!!
117 #         do not change it to %%configure
118 ./configure
119
120 %{__make} COPTS="%{rpmcflags} \
121         -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
122         -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\"" \
123         DEBUG="" VARDB="/var/lib/%{name}"
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_bindir},%{_mandir}/man{5,8}} \
128         $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
129
130 %{__make} install \
131         DESTDIR="$RPM_BUILD_ROOT" \
132         CLIENTBINDIR="/sbin" \
133         BINDIR="%{_sbindir}" \
134         LIBDIR="%{_libdir}" \
135         INCDIR="%{_includedir}" \
136         ADMMANDIR="%{_mandir}/man8" \
137         ADMMANEXT=.8 \
138         FFMANDIR="%{_mandir}/man5" \
139         LIBMANDIR="%{_mandir}/man3" \
140         LIBMANEXT=.3 \
141         USRMANDIR="%{_mandir}/man1" \
142         USRMANEXT=.1 \
143         VARDB="/var/lib/%{name}" \
144         FFMANEXT=.5
145
146 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
147 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
148 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
149 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
150
151 mv $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3 \
152         $RPM_BUILD_ROOT%{_mandir}/man1/omshell.1
153
154 install client/scripts/linux $RPM_BUILD_ROOT%{_sbindir}/dhclient-script
155
156 gzip -9nf doc/* README RELNOTES
157
158 touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
159
160 %clean
161 rm -rf $RPM_BUILD_ROOT
162
163 %post
164 /sbin/chkconfig --add dhcpd
165 touch /var/lib/%{name}/dhcpd.leases
166
167 if [ ! -d /var/lib/dhcp ]; then
168         install -d /var/lib/dhcp
169 fi
170
171 if [ -f /var/lock/subsys/dhcpd ]; then
172         /etc/rc.d/init.d/dhcpd restart >&2
173 else
174         echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
175 fi
176
177 %post relay
178 /sbin/chkconfig --add dhcp-relay
179 if [ -f /var/lock/subsys/dhcrelay ]; then
180         mv /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
181 fi
182 if [ -f /var/lock/subsys/dhcp-relay ]; then
183         /etc/rc.d/init.d/dhcp-relay restart >&2
184 else
185         echo "Run \"/etc/rc.d/init.d/dhcp-relay start\" to start dhcrelay daemon."
186 fi
187
188 %post client
189 if [ -d /var/lib/dhcp ]; then
190         install -d /var/lib/dhcp
191 fi
192
193 %preun
194 if [ "$1" = "0" ];then
195         if [ -f /var/lock/subsys/dhcpd ]; then
196                 /etc/rc.d/init.d/dhcpd stop >&2
197         fi
198         /sbin/chkconfig --del dhcpd
199 fi
200
201 %preun relay
202 if [ "$1" = "0" ];then
203         if [ -f /var/lock/subsys/dhcp-relay ]; then
204                 /etc/rc.d/init.d/dhcp-relay stop >&2
205         fi
206         /sbin/chkconfig --del dhcp-relay
207 fi
208
209 %triggerpostun -- dhcp < 3.0
210 if [ `grep ddns-update-style /etc/dhcpd.conf` = "" ]; then
211         echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
212         echo "" >> /etc/dhcpd.conf.tmp
213         cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp
214         mv -f /etc/dhcpd.conf.tmp /etc/dhcpd.conf
215 fi
216
217 %files
218 %defattr(644,root,root,755)
219 %doc doc/* README.gz RELNOTES.gz dhcpd.conf.sample
220 %{_mandir}/man1/*
221 %{_mandir}/man5/dhcp*
222 %{_mandir}/man8/dhcp*
223 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
224 %attr(755,root,root) %{_bindir}/*
225 %attr(755,root,root) %{_sbindir}/dhcpd
226 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
227 %attr(750,root,root) %dir /var/lib/%{name}
228 %ghost /var/lib/%{name}/dhcpd.leases
229
230 %files client
231 %defattr(644,root,root,755)
232 %attr(755,root,root) /sbin/dhclient
233 %attr(755,root,root) /sbin/dhclient-script
234 %{_mandir}/man[58]/dhclient*
235 %ghost /var/lib/%{name}/dhclient.leases
236
237 %files relay
238 %defattr(644,root,root,755)
239 %{_mandir}/man8/dhcrelay*
240 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
241 %attr(755,root,root) %{_sbindir}/dhcrelay
242 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
243
244 %files devel
245 %defattr(644,root,root,755)
246 %{_mandir}/man3/*
247 %{_libdir}/*.a
248 %{_includedir}/*
This page took 0.091903 seconds and 4 git commands to generate.