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