]>
Commit | Line | Data |
---|---|---|
3bb4bab9 | 1 | Summary: DHCP Server |
cd3ce1e4 | 2 | Summary(pl): Serwer DHCP |
3 | Name: dhcp | |
316335cf | 4 | Version: 2.0 |
cd3ce1e4 | 5 | Release: 1 |
ccf64540 | 6 | Serial: 1 |
cd3ce1e4 | 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 | |
cd3ce1e4 | 13 | BuildRoot: /tmp/%{name}-%{version}-root |
14 | Prereq: /sbin/chkconfig | |
15 | ||
16 | %description | |
17 | Dynamic Host Configuration Protocol Server | |
18 | ||
19 | %description -l pl | |
20 | Serwer DHCP (Dynamic Host Configuration Protocol) | |
21 | ||
3bb4bab9 | 22 | %package client |
23 | Summary: DHCP Client | |
24 | Summary(pl): Klient DHCP | |
25 | Group: Networking/Daemons | |
26 | Group(de): Sieciowe/Serwery | |
27 | ||
28 | %description client | |
29 | Dynamic Host Configuration Protocol Client | |
30 | ||
31 | %description client -l pl | |
32 | Klient DHCP (Dynamic Host Configuration Protocol) | |
33 | ||
45ef0575 | 34 | %package relay |
35 | Summary: DHCP Relay Agent | |
36 | Summary(pl): Agent przekazywania DHCP | |
37 | Group: Networking/Daemons | |
38 | Group(de): Sieciowe/Serwery | |
39 | ||
40 | %description relay | |
41 | Dynamic Host Configuration Protocol Relay Agent | |
42 | ||
43 | %description relay -l pl | |
44 | Agent przekazywania DHCP (Dynamic Host Configuration Protocol) | |
45 | ||
cd3ce1e4 | 46 | %prep |
3bb4bab9 | 47 | |
cd3ce1e4 | 48 | %setup -q |
cd3ce1e4 | 49 | |
50 | %build | |
cd3ce1e4 | 51 | |
52 | LDFLAGS="-s" ; export LDFLAGS | |
316335cf | 53 | %configure |
cd3ce1e4 | 54 | |
3bb4bab9 | 55 | make COPTS="$RPM_OPT_FLAGS" DEBUG="" \ |
56 | VARDB="/var/state/%{name}" | |
cd3ce1e4 | 57 | |
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
5f379258 | 61 | install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_mandir}/man{5,8}} \ |
3bb4bab9 | 62 | $RPM_BUILD_ROOT{/var/state/%{name},/etc/rc.d/init.d} |
cd3ce1e4 | 63 | |
64 | make install \ | |
65 | CLIENTBINDIR=$RPM_BUILD_ROOT/sbin \ | |
66 | BINDIR=$RPM_BUILD_ROOT%{_sbindir} \ | |
67 | ADMMANDIR=$RPM_BUILD_ROOT%{_mandir}/man8 \ | |
68 | ADMMANEXT=.8 \ | |
69 | FFMANDIR=$RPM_BUILD_ROOT%{_mandir}/man5 \ | |
70 | FFMANEXT=.5 | |
71 | ||
72 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd | |
73 | ||
74 | gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \ | |
84b1e8e3 | 75 | doc/* README RELNOTES CHANGES |
cd3ce1e4 | 76 | |
5cffd332 | 77 | touch $RPM_BUILD_ROOT/var/state/%{name}/{dhcpd,dhclient}.leases |
3bb4bab9 | 78 | |
cd3ce1e4 | 79 | %post |
80 | /sbin/chkconfig --add dhcpd | |
ccf64540 | 81 | touch /var/state/%{name}/dhcpd.leases |
cd3ce1e4 | 82 | |
83 | if [ -f /var/run/dhcpd.pid ]; then | |
c0934805 | 84 | /etc/rc.d/init.d/dhcpd restart >&2 |
85 | else | |
86 | echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon." | |
cd3ce1e4 | 87 | fi |
88 | ||
89 | %preun | |
c0934805 | 90 | if [ "$1" = "0" ];then |
cd3ce1e4 | 91 | /sbin/chkconfig --del dhcpd |
c0934805 | 92 | /etc/rc.d/init.d/dhcpd stop >&2 |
93 | fi | |
cd3ce1e4 | 94 | |
95 | %clean | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %files | |
99 | %defattr(644,root,root,755) | |
84b1e8e3 | 100 | %doc doc/* README.gz RELNOTES.gz CHANGES.gz |
3bb4bab9 | 101 | %{_mandir}/man5/dhcp* |
102 | %{_mandir}/man8/dhcp* | |
cd3ce1e4 | 103 | %attr(755,root,root) %{_sbindir}/dhcpd |
cd3ce1e4 | 104 | %attr(755,root,root) /etc/rc.d/init.d/dhcpd |
3bb4bab9 | 105 | %attr(750,root,root) %dir /var/state/%{name} |
106 | %ghost /var/state/%{name}/dhcpd.leases | |
107 | ||
108 | %files client | |
ccf64540 | 109 | %defattr(644,root,root,755) |
3bb4bab9 | 110 | %attr(755,root,root) /sbin/dhclient |
111 | %{_mandir}/man8/dhclient* | |
112 | %{_mandir}/man5/dhclient* | |
5cffd332 | 113 | %ghost /var/state/%{name}/dhclient.leases |
45ef0575 | 114 | |
115 | %files relay | |
116 | %defattr(644,root,root,755) | |
117 | %{_mandir}/man8/dhcrelay* | |
118 | %attr(755,root,root) %{_sbindir}/dhcrelay |