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