File openvas-scanner.spec of Package openvas-scanner
#
# spec file for package openvas-scanner
#
# Copyright (c) 2019-2023 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 https://bugs.opensuse.org/
#
%define sover 23
Name: openvas-scanner
Version: 23.10.1
Release: 0
Summary: The Scanner Module for OpenVAS
License: GPL-2.0-only
Group: Productivity/Networking/Security
URL: https://www.openvas.org
#Git-Clone: https://github.com/greenbone/openvas-scanner.git
Source: https://github.com/greenbone/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: gvm-sudo-profile
Source98: https://github.com/greenbone/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz.asc
Source99: https://www.greenbone.net/GBCommunitySigningKey.asc#/%{name}.keyring
Patch0: openvas-scanner-cmake.patch
BuildRequires: bison >= 2.5
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: graphviz
#BuildRequires: gvm-common >= 20.8.1
BuildRequires: libbsd-devel
BuildRequires: libgcrypt-devel
BuildRequires: libgpgme-devel >= 1.1.2
BuildRequires: libksba-devel >= 1.0.7
BuildRequires: libpcap-devel
BuildRequires: net-snmp-devel
BuildRequires: pkgconfig
BuildRequires: sudo
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(glib-2.0) >= 2.42
BuildRequires: pkgconfig(gnutls) >= 3.2.15
BuildRequires: pkgconfig(json-glib-1.0) >= 1.4.4
BuildRequires: pkgconfig(libgvm_base) >= 22.4
BuildRequires: pkgconfig(libgvm_boreas) >= 22.4
BuildRequires: pkgconfig(libgvm_util) >= 22.4
BuildRequires: pkgconfig(libopenvas_wincmd) >= 1.0.5
BuildRequires: pkgconfig(libopenvas_wmiclient) >= 22.4
BuildRequires: pkgconfig(libssh) >= 0.6.0
BuildRequires: pkgconfig(libcurl) >= 0.6.0
Requires: gvm-common >= 20.8.1
Requires: openssl
Requires: redis >= 3.2
Requires: rsync
Requires: sudo
Recommends: nmap
%description
This is the scanner module for the Open Vulnerability Assessment System (OpenVAS).
%package -n libopenvas_misc%{sover}
Summary: Support libraries for OpenVAS
Group: System/Libraries
%description -n libopenvas_misc%{sover}
The support libraries for the Greenbone Vulnerability Management framework.
%package -n libopenvas_misc-devel
Summary: Development files for the OpenVAS misc library
Group: Development/Libraries/C and C++
Requires: libopenvas_misc%{sover} = %{version}
%description -n libopenvas_misc-devel
The support libraries for the Greenbone Vulnerability Management framework.
This subpackage contains libraries and header files for developing
applications that want to make use of libopenvas_misc.
%package -n libopenvas_nasl%{sover}
Summary: Support libraries for OpenVAS
Group: System/Libraries
%description -n libopenvas_nasl%{sover}
The support libraries for the Greenbone Vulnerability Management framework.
%package -n libopenvas_nasl-devel
Summary: Development files for the OpenVAS nasl library
Group: Development/Libraries/C and C++
Requires: libopenvas_nasl%{sover} = %{version}
%description -n libopenvas_nasl-devel
The support libraries for the Greenbone Vulnerability Management framework.
This subpackage contains libraries and header files for developing
applications that want to make use of libopenvas_nasl.
%prep
%setup -q
%autopatch -p1
%build
%cmake \
-DCMAKE_SHARED_LINKER_FLAGS="" \
-DLOCALSTATEDIR=%{_localstatedir} \
-DOPENVAS_RUN_DIR=%{gvm_runtimedir}
%make_jobs
%install
%cmake_install
install -D -pm0400 %{SOURCE1} %{buildroot}%{_sysconfdir}/sudoers.d/gvm
%post -n libopenvas_misc%{sover} -p /sbin/ldconfig
%post -n libopenvas_nasl%{sover} -p /sbin/ldconfig
%postun -n libopenvas_misc%{sover} -p /sbin/ldconfig
%postun -n libopenvas_nasl%{sover} -p /sbin/ldconfig
%files
%license COPYING
%doc CHANGELOG.md README.md
%dir %{_sysconfdir}/openvas
%config(noreplace) %{_sysconfdir}/openvas/openvas_log.conf
%config(noreplace) %{_sysconfdir}/sudoers.d/gvm
%{_bindir}/openvas-nasl
%{_bindir}/openvas-nasl-lint
#%%{_bindir}/greenbone-nvt-sync
%{_sbindir}/openvas
#%%{_mandir}/man8/greenbone-nvt-sync.8%{?ext_man}
%{_mandir}/man8/openvas.8%{?ext_man}
%{_mandir}/man1/openvas-nasl.1%{?ext_man}
%{_mandir}/man1/openvas-nasl-lint.1%{?ext_man}
%files -n libopenvas_misc%{sover}
%{_libdir}/libopenvas_misc.so.%{sover}*
%files -n libopenvas_nasl%{sover}
%{_libdir}/libopenvas_nasl.so.%{sover}*
%files -n libopenvas_misc-devel
%{_libdir}/libopenvas_misc.so
%files -n libopenvas_nasl-devel
%{_libdir}/libopenvas_nasl.so
%changelog