]> git.pld-linux.org Git - packages/dhcp.git/blob - dhcp.spec
- updated to 3.0b1pl17.
[packages/dhcp.git] / dhcp.spec
1 Summary:        DHCP Server 
2 Summary(pl):    Serwer DHCP 
3 Name:           dhcp
4 Version:        3.0b1pl17
5 Release:        1
6 Epoch:          1
7 Group:          Networking/Daemons
8 Group(pl):      Sieciowe/Serwery
9 Copyright:      distributable
10 Vendor:         ISC
11 Source0:        ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
12 Source1:        %{name}.init
13 Source2:        %{name}-relay.init
14 Source3:        %{name}-relay.sysconfig
15 Source4:        %{name}d.conf.sample
16 Source5:        %{name}.sysconfig
17 BuildRequires:  groff
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 Prereq:         /sbin/chkconfig
20 Requires:       rc-scripts >= 0.2.0
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 %package client
33 Summary:        DHCP Client
34 Summary(pl):    Klient DHCP 
35 Group:          Networking/Daemons
36 Group(pl):      Sieciowe/Serwery
37 Obsoletes:      pump
38
39 %description client
40 Dynamic Host Configuration Protocol Client.
41
42 %description -l pl client
43 Klient DHCP (Dynamic Host Configuration Protocol).
44
45 %package relay
46 Summary:        DHCP Relay Agent
47 Summary(pl):    Agent przekazywania informacji DHCP
48 Group:          Networking/Daemons
49 Group(pl):      Sieciowe/Serwery
50 Requires:       rc-scripts >= 0.2.0
51
52 %description relay
53 Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
54 with DHCP clients to "relay" their requests to a subnet that has a
55 DHCP server on it. Because DHCP packets can be broadcast, they will
56 not be routed off of the local subnet. The DHCP relay takes care of
57 this for the client.
58
59
60 %description -l pl relay
61 Agent przekazywania DHCP (Dynamic Host Configuration Protocol) miêdzy
62 podsieciami.
63
64 %prep
65 %setup -q
66
67 cp %{SOURCE4} .
68
69 %build
70 LDFLAGS="-s" ; export LDFLAGS
71 %configure
72
73 %{__make} COPTS="$RPM_OPT_FLAGS -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
74         -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\"" \
75         DEBUG="" VARDB="/var/lib/%{name}"
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_mandir}/man{5,8}} \
81         $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
82
83 %{__make} install \
84         CLIENTBINDIR=$RPM_BUILD_ROOT/sbin \
85         BINDIR=$RPM_BUILD_ROOT%{_sbindir} \
86         ADMMANDIR=$RPM_BUILD_ROOT%{_mandir}/man8 \
87         ADMMANEXT=.8 \
88         FFMANDIR=$RPM_BUILD_ROOT%{_mandir}/man5 \
89         FFMANEXT=.5
90
91 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
92 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
93 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
94 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
95
96 install client/scripts/linux $RPM_BUILD_ROOT%{_sysconfdir}/dhclient-script
97
98 gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
99           doc/* README RELNOTES 
100
101 touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
102
103 %post
104 /sbin/chkconfig --add dhcpd
105 touch /var/lib/%{name}/dhcpd.leases
106
107 if [ ! -d /var/lib/dhcp ]; then
108         install -d /var/lib/dhcp
109 fi
110
111 if [ -f /var/lock/subsys/dhcpd ]; then
112         /etc/rc.d/init.d/dhcpd restart >&2
113 else
114         echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
115 fi
116
117 %post relay
118 /sbin/chkconfig --add dhcrelay
119
120 if [ -f /var/lock/subsys/dhcrelay ]; then
121         /etc/rc.d/init.d/dhcrelay restart >&2
122 else
123         echo "Run \"/etc/rc.d/init.d/dhcrelay start\" to start dhcrelay daemon."
124 fi
125
126 %post client
127 if [ -d /var/lib/dhcp ]; then
128         install -d /var/lib/dhcp
129 fi
130
131 %preun
132 if [ "$1" = "0" ];then
133         if [ -f /var/lock/subsys/dhcpd ]; then
134                 /etc/rc.d/init.d/dhcpd stop >&2
135         fi
136         /sbin/chkconfig --del dhcpd
137 fi
138
139 %preun relay
140 if [ "$1" = "0" ];then
141         if [ -f /var/lock/subsys/dhcrelay ]; then
142                 /etc/rc.d/init.d/dhrelay stop >&2
143         fi
144         /sbin/chkconfig --del dhcrelay
145 fi
146
147 %clean
148 rm -rf $RPM_BUILD_ROOT
149
150 %files
151 %defattr(644,root,root,755)
152 %doc doc/* README.gz RELNOTES.gz dhcpd.conf.sample
153 %{_mandir}/man5/dhcp*
154 %{_mandir}/man8/dhcp*
155 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
156 %attr(755,root,root) %{_sbindir}/dhcpd
157 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
158 %attr(750,root,root) %dir /var/lib/%{name}
159 %ghost /var/lib/%{name}/dhcpd.leases
160
161 %files client
162 %defattr(644,root,root,755)
163 %attr(755,root,root) /sbin/dhclient
164 %attr(755,root,root) %{_sysconfdir}/dhclient-script
165 %{_mandir}/man[58]/dhclient*
166 %ghost /var/lib/%{name}/dhclient.leases
167
168 %files relay
169 %defattr(644,root,root,755)
170 %{_mandir}/man8/dhcrelay*
171 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
172 %attr(755,root,root) %{_sbindir}/dhcrelay
173 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
This page took 0.037895 seconds and 3 git commands to generate.