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