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