1 1.1 christos Summary: The Internet Systems Consortium (ISC) DHCP server 2 1.1 christos Name: dhcp 3 1.1 christos %define version 3.0.2 4 1.1 christos Version: %{version} 5 1.1 christos Release: 2tac 6 1.1 christos Group: System Environment/Daemons 7 1.1 christos Source: /usr/local/src/RPM/SOURCES/dhcp-%{version}.tar.gz 8 1.1 christos Copyright: ISC 9 1.1 christos BuildRoot: /var/tmp/dhcp-%{version}-root 10 1.1 christos 11 1.1 christos %description 12 1.1 christos Dhcp includes the DHCP server which is used for dynamically configuring 13 1.1 christos hosts on a network. Host configuration items such as IP address, name 14 1.1 christos servers, domain name, etc. can all be retrieved from the DHCP server by 15 1.1 christos a DHCP client. This eases the burden of network wide configuration by 16 1.1 christos putting all of the configuration into one place. 17 1.1 christos 18 1.1 christos %package client 19 1.1 christos Summary: A DHCP client 20 1.1 christos Group: System Environment/Configuration 21 1.1 christos 22 1.1 christos %description client 23 1.1 christos Dhcp client is a DHCP client for various UNIX operating systems. It allows 24 1.1 christos a UNIX machine to obtain it's networking parameters from a DHCP server. 25 1.1 christos 26 1.1 christos %package relay 27 1.1 christos Summary: A DHCP relay 28 1.1 christos Group: System Environment/Daemons 29 1.1 christos 30 1.1 christos %description relay 31 1.1 christos Dhcp relay is a relay agent for DHCP packets. It is used on a subnet with 32 1.1 christos DHCP clients to "relay" their requests to a subnet that has a DHCP server 33 1.1 christos on it. Because DHCP packets can be broadcast, they will not be routed off 34 1.1 christos of the local subnet. The DHCP relay takes care of this for the client. 35 1.1 christos 36 1.1 christos %package devel 37 1.1 christos Summary: Development headers and libraries for the dhcpctl API 38 1.1 christos Group: Development/Libraries 39 1.1 christos 40 1.1 christos %description devel 41 1.1 christos Dhcp devel contains all of the libraries and headers for developing with 42 1.1 christos the dhcpctl API. 43 1.1 christos 44 1.1 christos %prep 45 1.1 christos %setup -q -n dhcp-%{version} 46 1.1 christos # do some file editing 47 1.1 christos egrep "VARRUN 48 1.1 christos ETC 49 1.1 christos VARDB" site.conf | sed -e 's/ *=/=/g' -e 's/= */=/g' > vars 50 1.1 christos . ./vars 51 1.1 christos cat << EOF >> includes/site.h 52 1.1 christos #define _PATH_DHCPD_PID "$VARRUN/dhcpd.pid" 53 1.1 christos #define _PATH_DHCPD_DB "$ETC/dhcpd.leases" 54 1.1 christos #define _PATH_DHCPD_CONF "$ETC/dhcpd.conf" 55 1.1 christos EOF 56 1.1 christos ./configure --with-nsupdate 57 1.1 christos 58 1.1 christos %build 59 1.1 christos make 60 1.1 christos 61 1.1 christos %install 62 1.1 christos rm -rf $RPM_BUILD_ROOT 63 1.1 christos mkdir -p $RPM_BUILD_ROOT/usr/local/sbin 64 1.1 christos 65 1.1 christos make DESTDIR="$RPM_BUILD_ROOT" install 66 1.1 christos 67 1.1 christos %ifos linux 68 1.1 christos mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/{init,rc0,rc1,rc2,rc3,rc4,rc5,rc6}.d 69 1.1 christos install -m 755 linux.init ${RPM_BUILD_ROOT}/etc/rc.d/init.d/dhcpd 70 1.1 christos %else 71 1.1 christos %ifos solaris 72 1.1 christos mkdir -p ${RPM_BUILD_ROOT}/etc/init.d 73 1.1 christos sed -e s'|@PREFIX@|%{_prefix}|g' < contrib/solaris.init > ${RPM_BUILD_ROOT}/etc/init.d/dhcpd 74 1.1 christos chmod 755 ${RPM_BUILD_ROOT}/etc/init.d/dhcpd 75 1.1 christos %endif 76 1.1 christos %endif 77 1.1 christos 78 1.1 christos # strip binaries and libraries 79 1.1 christos strip $RPM_BUILD_ROOT%{_prefix}/sbin/* || : 80 1.1 christos for i in `find $RPM_BUILD_ROOT/ -type 'f' -perm '+a=x' ! -name 'lib*so*'`; do 81 1.1 christos file $i |grep -q "not stripped" && strip $i 82 1.1 christos done 83 1.1 christos 84 1.1 christos %post 85 1.1 christos %ifos linux 86 1.1 christos /sbin/chkconfig --add dhcpd 87 1.1 christos /etc/rc.d/init.d/dhcpd start 88 1.1 christos %else 89 1.1 christos %ifos solaris 90 1.1 christos ln /etc/init.d/dhcpd /etc/rc2.d/S90dhcpd 91 1.1 christos ln /etc/init.d/dhcpd /etc/rc0.d/K30dhcpd 92 1.1 christos /etc/init.d/dhcpd start 93 1.1 christos %else 94 1.1 christos echo "Unknown O/S. You will need to manually configure your\nsystem" 95 1.1 christos echo "to start the DHCP server on system startup." 96 1.1 christos %endif 97 1.1 christos %endif 98 1.1 christos 99 1.1 christos %preun 100 1.1 christos if [ $1 = 0 ]; then 101 1.1 christos %ifos linux 102 1.1 christos /etc/rc.d/init.d/dhcpd stop 103 1.1 christos /sbin/chkconfig --del dhcpd 104 1.1 christos %else 105 1.1 christos %ifos solaris 106 1.1 christos /etc/init.d/dhcpd stop 107 1.1 christos rm /etc/rc2.d/S90dhcpd 108 1.1 christos rm /etc/rc0.d/K30dhcpd 109 1.1 christos %else 110 1.1 christos echo "Unknown O/S. You will need to manually clean up the DHCP" 111 1.1 christos echo "server startup\n in your system startup environment." 112 1.1 christos %endif 113 1.1 christos %endif 114 1.1 christos fi 115 1.1 christos 116 1.1 christos %clean 117 1.1 christos rm -rf $RPM_BUILD_ROOT 118 1.1 christos 119 1.1 christos %files 120 1.1 christos %defattr(-,root,root) 121 1.1 christos %doc COPYRIGHT DOCUMENTATION ISC-LICENSE CHANGES README RELNOTES doc/* 122 1.1 christos 123 1.1 christos %{_prefix}/sbin/dhcpd 124 1.1 christos %{_prefix}/man/cat1m/dhcpd.1m 125 1.1 christos %{_prefix}/man/cat4/dhcpd.conf.4 126 1.1 christos %{_prefix}/man/cat4/dhcpd.leases.4 127 1.1 christos %{_prefix}/man/cat4/dhcp-options.4 128 1.1 christos %{_prefix}/man/cat4/dhcp-eval.4 129 1.1 christos %{_prefix}/man/cat4/dhcp-contrib.4 130 1.1 christos %ifos linux 131 1.1 christos %config /etc/rc.d/init.d/dhcpd 132 1.1 christos %else 133 1.1 christos %ifos solaris 134 1.1 christos %config /etc/init.d/dhcpd 135 1.1 christos %endif 136 1.1 christos %endif 137 1.1 christos 138 1.1 christos %files devel 139 1.1 christos %{_prefix}/man/cat3 140 1.1 christos %{_prefix}/lib 141 1.1 christos %{_prefix}/include 142 1.1 christos 143 1.1 christos %files client 144 1.1 christos %{_prefix}/etc/dhclient-script 145 1.1 christos %{_prefix}/sbin/dhclient 146 1.1 christos %{_prefix}/man/cat1m/dhclient.1m 147 1.1 christos %{_prefix}/man/cat1m/dhclient-script.1m 148 1.1 christos %{_prefix}/man/cat4/dhclient.conf.4 149 1.1 christos %{_prefix}/man/cat4/dhclient.leases.4 150 1.1 christos 151 1.1 christos %files relay 152 1.1 christos %{_prefix}/sbin/dhcrelay 153 1.1 christos %{_prefix}/man/cat1m/dhcrelay.1m 154 1.1 christos 155 1.1 christos %changelog 156 1.1 christos * Fri Oct 1 1999 Brian J. Murrell <brian (at] interlinx.bc.ca> 157 1.1 christos - write a spec file for dhcpd 158