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