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