]> git.pld-linux.org Git - packages/dhcp.git/blob - dhcp.spec
- updated to 3.0rc8,
[packages/dhcp.git] / dhcp.spec
1 Summary:        DHCP Server 
2 Summary(pl):    Serwer DHCP 
3 Name:           dhcp
4 Version:        3.0rc8
5 Release:        1
6 Epoch:          1
7 Group:          Networking/Daemons
8 Group(de):      Netzwerkwesen/Server
9 Group(pl):      Sieciowe/Serwery
10 Copyright:      distributable
11 Vendor:         ISC
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
129 if [ -f /var/lock/subsys/dhcrelay ]; then
130         /etc/rc.d/init.d/dhcp-relay restart >&2
131 else
132         echo "Run \"/etc/rc.d/init.d/dhcp-relay start\" to start dhcrelay daemon."
133 fi
134
135 %post client
136 if [ -d /var/lib/dhcp ]; then
137         install -d /var/lib/dhcp
138 fi
139
140 %preun
141 if [ "$1" = "0" ];then
142         if [ -f /var/lock/subsys/dhcpd ]; then
143                 /etc/rc.d/init.d/dhcpd stop >&2
144         fi
145         /sbin/chkconfig --del dhcpd
146 fi
147
148 %preun relay
149 if [ "$1" = "0" ];then
150         if [ -f /var/lock/subsys/dhcrelay ]; then
151                 /etc/rc.d/init.d/dhcp-relay stop >&2
152         fi
153         /sbin/chkconfig --del dhcp-relay
154 fi
155
156 %clean
157 rm -rf $RPM_BUILD_ROOT
158
159 %files
160 %defattr(644,root,root,755)
161 %doc doc/* README.gz RELNOTES.gz dhcpd.conf.sample
162 %{_mandir}/man5/dhcp*
163 %{_mandir}/man8/dhcp*
164 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
165 %attr(755,root,root) %{_sbindir}/dhcpd
166 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
167 %attr(750,root,root) %dir /var/lib/%{name}
168 %ghost /var/lib/%{name}/dhcpd.leases
169
170 %files client
171 %defattr(644,root,root,755)
172 %attr(755,root,root) /sbin/dhclient
173 %attr(755,root,root) %{_sysconfdir}/dhclient-script
174 %{_mandir}/man[58]/dhclient*
175 %ghost /var/lib/%{name}/dhclient.leases
176
177 %files relay
178 %defattr(644,root,root,755)
179 %{_mandir}/man8/dhcrelay*
180 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
181 %attr(755,root,root) %{_sbindir}/dhcrelay
182 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
This page took 0.557547 seconds and 4 git commands to generate.