Blob Blame History Raw
Name:		checkdns
Version:	0.5
Release:	10%{?dist}
Summary:	A Domain Name Server analysis and reporting tool

Group:		Applications/Internet
License:	GPLv2+
URL:		http://www.enderunix.org/checkdns/
Source0:	http://www.enderunix.org/checkdns/%{name}-%{version}.tar.gz
Source1:	checkdns.cron
Patch0:		checkdns-0.5.config_location.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires:	httpd, bind
Requires(pre):	shadow-utils

%description
This program is a domain name server analysis and reporting tool. It checks and
reports whether a domain name, hosted by your organization, is still in use,
and if so, reports whether your name servers are still the delegated name
servers of the domain name in question.

Reports are generated both to the console and as HTML output. HTMLs also
include information about the MX and WWW records of the domain name.

The tool is expected to be of great use for Internet Service Providers who are
in need of keeping track of lame dns records. 

%prep
%setup -q
%patch0 -p0 -b .config_location
mv Makefile Makefile.dist
mv Makefile.Linux Makefile

%build
CFLAGS="$RPM_OPT_FLAGS"
export CFLAGS

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/%{_sbindir}
install -p checkdns $RPM_BUILD_ROOT/%{_sbindir}
install -d $RPM_BUILD_ROOT/%{_sysconfdir}
sed -e '/html_output_dir/s@usr/local/apache/htdocs@var/www/html@' -e '/lang_file/s@local/@@' checkdns.conf-dist > $RPM_BUILD_ROOT/%{_sysconfdir}/checkdns.conf
install -d $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d
install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/%{name}
install -d $RPM_BUILD_ROOT/%{_localstatedir}/www/html/%{name}
install -p -m 0644 checkdns.css $RPM_BUILD_ROOT/%{_localstatedir}/www/html/%{name}
install -d $RPM_BUILD_ROOT/%{_datadir}/%{name}
cp -rp lang $RPM_BUILD_ROOT/%{_datadir}/%{name}

%clean
rm -rf $RPM_BUILD_ROOT

%pre
getent passwd checkdns >/dev/null || useradd -d \
 %{_localstatedir}/www/html/%{name} -r checkdns
:

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING INSTALL LICENSE README THANKS TODO
%config(noreplace) %{_sysconfdir}/checkdns.conf
%config(noreplace) %{_sysconfdir}/cron.d/%{name}
%{_sbindir}/%{name}
%{_datadir}/%{name}
%dir %attr(-,checkdns,apache) %{_localstatedir}/www/html/%{name}
%config(noreplace) %{_localstatedir}/www/html/%{name}/checkdns.css

%changelog
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Nov 28 2008 John Guthrie <guthrie@counterexampel.org> - 0.5-7
- Changed %%{optflags} -> $RPM_OPT_FLAGS
- Removed the postun section that contained a userdel command.

* Wed Nov 26 2008 John Guthrie <guthrie@counterexampel.org> - 0.5-6
- Added %%optflags to %%build.

* Tue Nov 25 2008 John Guthrie <guthrie@counterexampel.org> - 0.5-5
- Corrected License: GPLv2 -> GPLv2+ to match the text in the license headers.
- Create a new user checkdns upon install.  Delete that user upon package
  removal.
- Removed the suid bits from the program and the /var/www/html/checkdns
  directory.  Changed ownership on the directory to checknds:apache.
- Added cron job.

* Sat Sep 13 2008 John Guthrie <guthrie@counterexampel.org> - 0.5-4
- Cleaned up Source list
- Re-built without Packager tag

* Fri Sep 12 2008 John Guthrie <guthrie@counterexample.org> - 0.5-3
- Added Requires line for shadow-utils
- Moved the checkdns binary to /usr/sbin
- Changed permission scheme

* Fri Sep 12 2008 John Guthrie <guthrie@counterexample.org> - 0.5-2
- Fixed rpmlint errors and warnings
- Added "preserve" flags to copying commands in the %%install section

* Thu Aug 28 2008 John Guthrie <guthrie@counterexample.org> - 0.5-1
- Initial creation.