File nikto.spec of Package nikto

#
# spec file for package nikto
#
# Copyright (c) 2015 SUSE LINUX 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:           nikto
Version:        2.1.6
Release:        0
Summary:        Web server scanner
License:        GPL-2.0
Group:          Productivity/Networking/Security
Url:            https://cirt.net/Nikto2
Source:         https://github.com/sullo/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE nikto-config.patch -- Make paths FHS compliant
Patch0:         %{name}-config.patch
Patch1:		CVE-2018-11652.patch
BuildRequires:  fdupes
Requires:       nmap
Requires:       perl-Net-SSLeay
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Nikto is an Open Source (GPL) web server scanner which performs
comprehensive tests against web servers for multiple items,
including over 3500 potentially dangerous files/CGIs, versions on
over 900 servers, and version specific problems on over 250 servers.
Scan items and plugins are frequently updated and can be
automatically updated (if desired).

%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
# Nothing to build.

%install
install -Dm 0755 program/%{name}.pl %{buildroot}%{_bindir}/%{name}
install -Dm 0644 program/%{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
install -Dm 0644 program/docs/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1

mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/
cp -a program/{databases,plugins,templates} %{buildroot}%{_localstatedir}/lib/%{name}/

%files
%defattr(-,root,root)
%doc program/docs/{*.txt,%{name}.dtd,%{name}_manual.html}
%config(noreplace) %{_sysconfdir}/%{name}.conf
%config %{_localstatedir}/lib/%{name}/
%{_bindir}/%{name}
%{_mandir}/man?/%{name}.?%{?ext_man}

%changelog
openSUSE Build Service is sponsored by