File sleuth.spec of Package sleuth

#
# spec file for package sleuth (Version 1.4.4)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           sleuth
BuildRequires:  apache2-devel libapr-util1-devel pcre-devel
License:        GPL-2.0+
Group:          Productivity/Networking/DNS/Utilities
AutoReqProv:    on
Version:        1.4.4
Release:        39
Requires:       perl-Net-DNS
Source:         %{name}-%{version}.tar.bz2
Patch:          %{name}-%{version}.diff
Url:            ftp://atrey.karlin.mff.cuni.cz/pub/local/mj/net/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Perl script for easy checking (DNS, common errors and etc.)
BuildArch:      noarch
%define apache_serverroot %(/usr/sbin/apxs2 -q datadir 2>/dev/null || apxs -q PREFIX)

%description
Sleuth is a perl script designed for easy checking of DNS zones for
common errors and also for processing of secondary name service
requests. It was written after examination of at least a dozen of
utilities claiming to do this job, finding that all of them are either
unable to discover most zone bugs or too ugly to maintain. Sleuth also
lists the corresponding RFC references with most of its error messages,
so that the people upset with their zones being buggy can simply look
up what is exactly going wrong and how to fix it.



Authors:
--------
    Martin Mares <mj@ucw.cz>

%prep
%setup -q -n %{name}-%{version}
%patch -p1

%build
make 

%install
rm -rf $RPM_BUILD_ROOT;
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/etc
make DESTDIR=$RPM_BUILD_ROOT install 
install -d $RPM_BUILD_ROOT%{apache_serverroot}/cgi-bin
install -m 755 check.cgi $RPM_BUILD_ROOT%{apache_serverroot}/cgi-bin
install -m 644 check.conf $RPM_BUILD_ROOT%{apache_serverroot}/cgi-bin

%clean
rm -rf $RPM_BUILD_ROOT;

%files
%defattr(-,root,root)
%doc README THANKS README.SuSE
/usr/bin/*
%attr(755,root,root) %{apache_serverroot}/cgi-bin/check.cgi
%attr(644,root,root) %{apache_serverroot}/cgi-bin/check.conf
%config /etc/*

%changelog
* Fri Jun 27 2008 anicka@suse.cz
- update to 1.4.4
  * sleuth (check_zone): Dashes are valid in service names.
* Wed Apr 09 2008 anicka@suse.cz
- update to 1.4.3
  * sleuth (msg): Messages of severity "0" should be ignored.
* Wed Jul 04 2007 anicka@suse.cz
- update to 1.4.2
  * sleuth (check_zone): Reverse zone names of type "a.b-c.d.e.f"
  are now parsed correctly.
  * sleuth.conf: Use http://rfc.net/ for RFC references.
  * sleuth.conf: Changed the default set of test_hosts.
  * sleuth (check_ns_sanity): When checking connectivity with other
  servers, don't try reverse resolving, because it's often broken.
* Sun Feb 11 2007 ro@suse.de
- fix build as non-root
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Jun 21 2005 anicka@suse.cz
- update to 1.4
* Mon Apr 19 2004 ro@suse.de
- build with apache2
* Fri Aug 02 2002 ro@suse.de
- adapt server-root
* Wed Sep 26 2001 tcrhak@suse.cz
- removed nsc-2.3
- moved perl-Net-DNS from '# neededforbuild' to 'Requires:'
- added installation of cgi scripts together with README.SuSE noting
- it
* Mon Jul 30 2001 adostal@suse.cz
- add nsc version 2.3
* Wed Jun 20 2001 adostal@suse.cz
- upgrade to 1.3 (elimination a small bug from 1.2)
* Fri Jun 15 2001 adostal@suse.cz
- upgrade to 1.2 (spec and patch)
* Mon Jun 04 2001 adostal@suse.cz
- creation a new package and patch the makefile (DESTDIR)
openSUSE Build Service is sponsored by