File openvas-server.spec of Package openvas-server

#
# spec file for package openvas-server (Version 2.0.2)
#
# 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/
#

# norootforbuild


Name:           openvas-server
Version:        2.0.2
Release:        1
License:        GPL v2 only
Group:          Productivity/Networking/Security
Url:            http://www.openvas.org
Source0:        %{name}-%{version}.tar.bz2
Source1:        Readme.SuSE
Source2:        openvas-server.logrotate
Source3:        openvas-server.init.d
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  glib2-devel gnutls-devel libgpgme-devel libopenvas-devel libopenvasnasl-devel libpcap-devel
Requires:       logrotate
PreReq:         %insserv_prereq %fillup_prereq
Summary:        The Open Vulnerability Assessment System (OpenVAS) Server

%description
openvas-server is the actual server component of the Open Vulnerability
Assessment System (OpenVAS).

%package devel
License:        GPL v2 only
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Summary:        Development files for openvas-server

%description devel
This package contains the development files (mainly C header files) for
openvas-server.



%prep
%setup -q
%__cp %{S:1} .

%build
#prevent the key generation script from putting the keys in /usr/com (sharedstatedir default)
%configure --sharedstatedir=%{_localstatedir}/lib
%__make

%install
%makeinstall
%__install -D -m 744 %{_sourcedir}/openvas-server.init.d %{buildroot}%{_initrddir}/openvas-server
%__install -D -m 644 %{_sourcedir}/openvas-server.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/openvas-server
%__ln_s %{_initrddir}/openvas-server %{buildroot}%{_sbindir}/rcopenvas-server

%clean
test "%{buildroot}" != "/" && %__rm -rf %{buildroot}

%post
%fillup_and_insserv -f openvas-server

%preun
%stop_on_removal openvas-server

%postun
%restart_on_update openvas-server
%insserv_cleanup

%files
%defattr(-,root,root)
%doc CHANGES COPYING TODO Readme.SuSE
%config %{_sysconfdir}/logrotate.d/openvas-server
%{_bindir}/openvas-mkcert-client
%{_bindir}/openvas-mkrand
%{_initrddir}/openvas-server
%{_sbindir}/rcopenvas-server
%{_sbindir}/openvas*
%{_mandir}/man?/openvas*
%dir %{_localstatedir}/lib/openvas
%{_localstatedir}/lib/openvas/openvas-services
%config %dir %{_sysconfdir}/openvas
%dir %{_localstatedir}/log/openvas

%files devel
%defattr(-,root,root)
%{_bindir}/openvasd-config
%{_includedir}/openvas/*

%changelog
openSUSE Build Service is sponsored by