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