]> git.pld-linux.org Git - packages/dhcp.git/blob - dhcp.spec
- spec adapterized.
[packages/dhcp.git] / dhcp.spec
1 Summary:        DHCP Server 
2 Summary(pl):    Serwer DHCP 
3 Name:           dhcp
4 Version:        3.0b1pl13
5 Release:        3
6 Serial:         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:        dhcp.init
13 Source2:        dhcp-relay.init
14 Source3:        dhcp-relay.sysconfig
15 Source4:        dhcpd.conf.sample
16 Source5:        dhcp.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 configuration
25 information (IP address, subnetmask, broadcast address, etc.) from a DHCP
26 server. The overall purpose of DHCP is to make it easier to administer a
27 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(de):      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(de):      Sieciowe/Serwery
50 Requires:       rc-scripts >= 0.2.0
51
52 %description relay
53 Dynamic Host Configuration Protocol Relay Agent.
54
55 %description -l pl relay
56 Agent przekazywania DHCP (Dynamic Host Configuration Protocol) miêdzy
57 podsieciami.
58
59 %prep
60 %setup -q
61
62 cp %{SOURCE4} .
63
64 %build
65 LDFLAGS="-s" ; export LDFLAGS
66 %configure
67
68 make COPTS="$RPM_OPT_FLAGS -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
69         -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\"" \
70         DEBUG="" VARDB="/var/lib/%{name}"
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74
75 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_mandir}/man{5,8}} \
76         $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
77
78 make install \
79         CLIENTBINDIR=$RPM_BUILD_ROOT/sbin \
80         BINDIR=$RPM_BUILD_ROOT%{_sbindir} \
81         ADMMANDIR=$RPM_BUILD_ROOT%{_mandir}/man8 \
82         ADMMANEXT=.8 \
83         FFMANDIR=$RPM_BUILD_ROOT%{_mandir}/man5 \
84         FFMANEXT=.5
85
86 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
87 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
88 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
89 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
90
91 install client/scripts/linux $RPM_BUILD_ROOT%{_sysconfdir}/dhclient-script
92
93 gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
94           doc/* README RELNOTES 
95
96 touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
97
98 %post
99 /sbin/chkconfig --add dhcpd
100 touch /var/lib/%{name}/dhcpd.leases
101
102 if [ ! -d /var/lib/dhcp ]; then
103         install -d /var/lib/dhcp
104 fi
105
106 if [ -f /var/lock/subsys/dhcpd ]; then
107         /etc/rc.d/init.d/dhcpd restart >&2
108 else
109         echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
110 fi
111
112 %post relay
113 /sbin/chkconfig --add dhcrelay
114
115 if [ -f /var/lock/subsys/dhcrelay ]; then
116         /etc/rc.d/init.d/dhcrelay restart >&2
117 else
118         echo "Run \"/etc/rc.d/init.d/dhcrelay start\" to start dhcrelay daemon."
119 fi
120
121 %post client
122 if [ -d /var/lib/dhcp ]; then
123         install -d /var/lib/dhcp
124 fi
125
126 %preun
127 if [ "$1" = "0" ];then
128         if [ -f /var/lock/subsys/dhcpd ]; then
129                 /etc/rc.d/init.d/dhcpd stop >&2
130         fi
131         /sbin/chkconfig --del dhcpd
132 fi
133
134 %preun relay
135 if [ "$1" = "0" ];then
136         if [ -f /var/lock/subsys/dhcrelay ]; then
137                 /etc/rc.d/init.d/dhrelay stop >&2
138         fi
139         /sbin/chkconfig --del dhcrelay
140 fi
141
142 %clean
143 rm -rf $RPM_BUILD_ROOT
144
145 %files
146 %defattr(644,root,root,755)
147 %doc doc/* README.gz RELNOTES.gz dhcpd.conf.sample
148 %{_mandir}/man5/dhcp*
149 %{_mandir}/man8/dhcp*
150 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
151 %attr(755,root,root) %{_sbindir}/dhcpd
152 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
153 %attr(750,root,root) %dir /var/lib/%{name}
154 %ghost /var/lib/%{name}/dhcpd.leases
155
156 %files client
157 %defattr(644,root,root,755)
158 %attr(755,root,root) /sbin/dhclient
159 %attr(755,root,root) %{_sysconfdir}/dhclient-script
160 %{_mandir}/man[58]/dhclient*
161 %ghost /var/lib/%{name}/dhclient.leases
162
163 %files relay
164 %defattr(644,root,root,755)
165 %{_mandir}/man8/dhcrelay*
166 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
167 %attr(755,root,root) %{_sbindir}/dhcrelay
168 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
This page took 0.036243 seconds and 4 git commands to generate.