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

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

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

BuildRequires:  gcc
%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
install -D -p %{name} $RPM_BUILD_ROOT/%{_sbindir}/%{name}
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 -p -m 0640 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/%{name}
install -D -p -m 0644 %{name}.css $RPM_BUILD_ROOT/%{_localstatedir}/www/html/%{name}/%{name}.css
install -d $RPM_BUILD_ROOT/%{_datadir}/%{name}
cp -rp lang $RPM_BUILD_ROOT/%{_datadir}/%{name}


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

%files
%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
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue Feb 25 2014 Matthieu Saulnier <fantom@fedoraproject.org> - 0.5-15
- Add requirement on crontabs (Fix RHBZ #947058)
- Fix modes of cron job file in %%install section
- Remove obsoletes tags in spec file
- Remove %%clean section in spec file
- Cleanup %%install section in spec file

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* 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.