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