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