]> git.pld-linux.org Git - packages/dhcp.git/blob - dhcp.spec
- added "Requires: rc-scripts >= 0.2.0" for main and relay subpackage.
[packages/dhcp.git] / dhcp.spec
1 Summary:        DHCP Server 
2 Summary(pl):    Serwer DHCP 
3 Name:           dhcp
4 Version:        3.0b1pl13
5 Release:        2
6 Serial:         1
7 Group:          Networking/Daemons
8 Group(de):      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" DEBUG="" \
69         VARDB="/var/state/%{name}"
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73
74 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_mandir}/man{5,8}} \
75         $RPM_BUILD_ROOT{/var/state/%{name},/etc/{rc.d/init.d,sysconfig}}
76
77 make install \
78         CLIENTBINDIR=$RPM_BUILD_ROOT/sbin \
79         BINDIR=$RPM_BUILD_ROOT%{_sbindir} \
80         ADMMANDIR=$RPM_BUILD_ROOT%{_mandir}/man8 \
81         ADMMANEXT=.8 \
82         FFMANDIR=$RPM_BUILD_ROOT%{_mandir}/man5 \
83         FFMANEXT=.5
84
85 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
86 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
87 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
88 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
89
90 gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
91           doc/* README RELNOTES 
92
93 touch $RPM_BUILD_ROOT/var/state/%{name}/{dhcpd,dhclient}.leases
94
95 %post
96 /sbin/chkconfig --add dhcpd
97 touch /var/state/%{name}/dhcpd.leases
98
99 if [ -f /var/lock/subsys/dhcpd ]; then
100         /etc/rc.d/init.d/dhcpd restart >&2
101 else
102         echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
103 fi
104
105 %post relay
106 /sbin/chkconfig --add dhcrelay
107
108 if [ -f /var/lock/subsys/dhcrelay ]; then
109         /etc/rc.d/init.d/dhcrelay restart >&2
110 else
111         echo "Run \"/etc/rc.d/init.d/dhcrelay start\" to start dhcrelay daemon."
112 fi
113
114 %preun
115 if [ "$1" = "0" ];then
116         if [ -f /var/lock/subsys/dhcpd ]; then
117                 /etc/rc.d/init.d/dhcpd stop >&2
118         fi
119         /sbin/chkconfig --del dhcpd
120 fi
121
122 %preun relay
123 if [ "$1" = "0" ];then
124         if [ -f /var/lock/subsys/dhcrelay ]; then
125                 /etc/rc.d/init.d/dhrelay stop >&2
126         fi
127         /sbin/chkconfig --del dhcrelay
128 fi
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %files
134 %defattr(644,root,root,755)
135 %doc doc/* README.gz RELNOTES.gz dhcpd.conf.sample
136 %{_mandir}/man5/dhcp*
137 %{_mandir}/man8/dhcp*
138 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
139 %attr(755,root,root) %{_sbindir}/dhcpd
140 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
141 %attr(750,root,root) %dir /var/state/%{name}
142 %ghost /var/state/%{name}/dhcpd.leases
143
144 %files client
145 %defattr(644,root,root,755)
146 %attr(755,root,root) /sbin/dhclient
147 %{_mandir}/man[58]/dhclient*
148 %ghost /var/state/%{name}/dhclient.leases
149
150 %files relay
151 %defattr(644,root,root,755)
152 %{_mandir}/man8/dhcrelay*
153 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
154 %attr(755,root,root) %{_sbindir}/dhcrelay
155 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
This page took 0.050629 seconds and 4 git commands to generate.