%define _name dnrd %define _version 2.20.1 %define _release 1 Summary: Domain Name Relay Daemon Name: %{_name} Version: %{_version} Release: %{_release} Source: dnrd-%{_version}.tar.gz Source1: dnrd.aix.init Source2: dnrd.aix.sysconfig Patch0: dnrd-2.20.1-aix.patch URL: http://dnrd.sourceforge.net/ Group: Productivity/Networking/DNS/Servers Packager: Michael Perzl License: GPL BuildRoot: %{_tmppath}/%{_name}-%{_version}-root Prefix: %{_prefix} %description The Domain Name Relay Daemon (DNRD) is a simple "proxy" nameserver. It is meant to be used for home networks that can connect to the internet using one of several ISP's. DNRD is pretty simple. It takes DNS queries from hosts, and forwards them to the "real" DNS server. It takes DNS replies from the DNS server, and forwards them to the client. What makes DNRD special is that it can be configured to forward to different DNS servers depending on what ISP you are dialing. Before DNRD, there was no easy way to change the default nameserver on a Linux system. You can play games with /etc/resolv.conf, such as copying other versions of this file in place depending on which ISP you're dialing into, but that is a pain. Instead, you can run DNRD on your dial-up machine. Whenever you dial into an ISP, run dnrd with the appropriate DNS server as an argument. Here's an example of how you would run it: dnrd -s 1.2.3.4 DNRD was originally designed to work in conjuction with mserver. It works very well with mserver, but works just fine with other dialup systems as well as in other non-dialup environments. %prep %setup -q %patch -p1 %build export CC=xlc export CFLAGS="-O2" export CXXFLAGS="-O2" ./configure --prefix=%{_prefix} make %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install-strip rm -rf $RPM_BUILD_ROOT%{_datadir}/doc mkdir -p $RPM_BUILD_ROOT%{_prefix}/etc/dnrd install -m 0644 doc/master.sample $RPM_BUILD_ROOT/%{_prefix}/etc/dnrd/master mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/ install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dnrd mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc2.d/ mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc3.d/ ln -sf '../init.d/dnrd' $RPM_BUILD_ROOT/etc/rc.d/rc2.d/S20dnrd ln -sf '../init.d/dnrd' $RPM_BUILD_ROOT/etc/rc.d/rc2.d/K20dnrd ln -sf '../init.d/dnrd' $RPM_BUILD_ROOT/etc/rc.d/rc3.d/S20dnrd ln -sf '../init.d/dnrd' $RPM_BUILD_ROOT/etc/rc.d/rc3.d/K20dnrd mkdir -p $RPM_BUILD_ROOT/etc/sysconfig install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dnrd %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc AUTHORS ChangeLog COPYING NEWS README doc/master.sample doc/README* %dir %{_prefix}/etc/dnrd %config(noreplace) %{_prefix}/etc/dnrd/master %{_sbindir}/dnrd %doc %{_mandir}/man8/dnrd.8* %dir /etc/sysconfig /etc/sysconfig/dnrd /etc/rc.d/init.d/dnrd /etc/rc.d/rc2.d/S20dnrd /etc/rc.d/rc2.d/K20dnrd /etc/rc.d/rc3.d/S20dnrd /etc/rc.d/rc3.d/K20dnrd %changelog * Mon Jan 02 2006 Michael Perzl - first version for AIX V5.1 and higher * Mon Jan 10 2005 Pascal Bleser 2.18 - new package