]> git.pld-linux.org Git - packages/dhcp.git/blob - dhcp.spec
- finished transition to new lock name (/var/lock/subsys/dhcp-relay)
[packages/dhcp.git] / dhcp.spec
1 Summary:        DHCP Server 
2 Summary(pl):    Serwer DHCP 
3 Name:           dhcp
4 Version:        3.0rc10
5 Release:        3
6 Epoch:          1
7 Vendor:         ISC
8 Group:          Networking/Daemons
9 Group(de):      Netzwerkwesen/Server
10 Group(pl):      Sieciowe/Serwery
11 Copyright:      distributable
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 %clean
159 rm -rf $RPM_BUILD_ROOT
160
161 %files
162 %defattr(644,root,root,755)
163 %doc doc/* README.gz RELNOTES.gz dhcpd.conf.sample
164 %{_mandir}/man5/dhcp*
165 %{_mandir}/man8/dhcp*
166 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
167 %attr(755,root,root) %{_sbindir}/dhcpd
168 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
169 %attr(750,root,root) %dir /var/lib/%{name}
170 %ghost /var/lib/%{name}/dhcpd.leases
171
172 %files client
173 %defattr(644,root,root,755)
174 %attr(755,root,root) /sbin/dhclient
175 %attr(755,root,root) %{_sysconfdir}/dhclient-script
176 %{_mandir}/man[58]/dhclient*
177 %ghost /var/lib/%{name}/dhclient.leases
178
179 %files relay
180 %defattr(644,root,root,755)
181 %{_mandir}/man8/dhcrelay*
182 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
183 %attr(755,root,root) %{_sbindir}/dhcrelay
184 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
This page took 0.038102 seconds and 4 git commands to generate.