]> git.pld-linux.org Git - packages/dhcp.git/blob - dhcp.spec
- updated to 3.0b1pl12
[packages/dhcp.git] / dhcp.spec
1 Summary:        DHCP Server 
2 Summary(pl):    Serwer DHCP 
3 Name:           dhcp
4 Version:        3.0b1pl12
5 Release:        1
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:      /tmp/%{name}-%{version}-root
19 Prereq:         /sbin/chkconfig
20 Requires:       rc-scripts
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 You should install dhcp if you want to set up a DHCP server on your network.
30
31 %description -l pl
32 Serwer DHCP (Dynamic Host Configuration Protocol)
33
34 %package client
35 Summary:        DHCP Client
36 Summary(pl):    Klient DHCP 
37 Group:          Networking/Daemons
38 Group(de):      Sieciowe/Serwery
39
40 %description client
41 Dynamic Host Configuration Protocol Client.
42
43 %description client -l pl
44 Klient DHCP (Dynamic Host Configuration Protocol).
45
46 %package relay
47 Summary:        DHCP Relay Agent
48 Summary(pl):    Agent przekazywania DHCP
49 Group:          Networking/Daemons
50 Group(de):      Sieciowe/Serwery
51
52 %description relay
53 Dynamic Host Configuration Protocol Relay Agent.
54
55 %description relay -l pl
56 Agent przekazywania DHCP (Dynamic Host Configuration Protocol).
57
58 %prep
59 %setup -q
60
61 cp %{SOURCE4} .
62
63 %build
64 LDFLAGS="-s" ; export LDFLAGS
65 %configure
66
67 make COPTS="$RPM_OPT_FLAGS" DEBUG="" \
68         VARDB="/var/state/%{name}"
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72
73 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_mandir}/man{5,8}} \
74         $RPM_BUILD_ROOT{/var/state/%{name},/etc/{rc.d/init.d,sysconfig}}
75
76 make install \
77         CLIENTBINDIR=$RPM_BUILD_ROOT/sbin \
78         BINDIR=$RPM_BUILD_ROOT%{_sbindir} \
79         ADMMANDIR=$RPM_BUILD_ROOT%{_mandir}/man8 \
80         ADMMANEXT=.8 \
81         FFMANDIR=$RPM_BUILD_ROOT%{_mandir}/man5 \
82         FFMANEXT=.5
83
84 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
85 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
86 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
87 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
88
89 gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
90           doc/* README RELNOTES 
91
92 touch $RPM_BUILD_ROOT/var/state/%{name}/{dhcpd,dhclient}.leases
93
94 %post
95 /sbin/chkconfig --add dhcpd
96 touch /var/state/%{name}/dhcpd.leases
97
98 if [ -f /var/run/dhcpd.pid ]; then
99         /etc/rc.d/init.d/dhcpd restart >&2
100 else
101         echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
102 fi
103
104 %post relay
105 /sbin/chkconfig --add dhcrelay
106
107 if [ -f /var/run/dhcrelay.pid ]; then
108         /etc/rc.d/init.d/dhcrelay restart >&2
109 else
110         echo "Run \"/etc/rc.d/init.d/dhcrelay start\" to start dhcrelay daemon."
111 fi
112
113 %preun
114 if [ "$1" = "0" ];then
115         /sbin/chkconfig --del dhcpd
116         /etc/rc.d/init.d/dhcpd stop >&2
117 fi
118
119 %preun relay
120 if [ "$1" = "0" ];then
121         /sbin/chkconfig --del dhcrelay
122         /etc/rc.d/init.d/dhrelay stop >&2
123 fi
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %files
129 %defattr(644,root,root,755)
130 %doc doc/* README.gz RELNOTES.gz dhcpd.conf.sample
131 %{_mandir}/man5/dhcp*
132 %{_mandir}/man8/dhcp*
133 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
134 %attr(755,root,root) %{_sbindir}/dhcpd
135 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
136 %attr(750,root,root) %dir /var/state/%{name}
137 %ghost /var/state/%{name}/dhcpd.leases
138
139 %files client
140 %defattr(644,root,root,755)
141 %attr(755,root,root) /sbin/dhclient
142 %{_mandir}/man[58]/dhclient*
143 %ghost /var/state/%{name}/dhclient.leases
144
145 %files relay
146 %defattr(644,root,root,755)
147 %{_mandir}/man8/dhcrelay*
148 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
149 %attr(755,root,root) %{_sbindir}/dhcrelay
150 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
This page took 0.040461 seconds and 4 git commands to generate.