File openvas-libraries.spec of Package openvas-libraries

#
# spec file for package openvas-libraries (Version 3.0.5)
#
# Copyright (c) 2010 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

%define soname 3

Name:           openvas-libraries
Version:        3.0.5
Release:        4
License:        GPLv2
Group:          Productivity/Networking/Security
Url:            http://www.openvas.org
Source:         %{name}-%{version}.tar.bz2
Patch0:         openvas-libraries-3.0.5-no_undefined.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  bison
BuildRequires:  cmake >= 2.6.0
BuildRequires:  libgpgme-devel
BuildRequires:  libpcap-devel
BuildRequires:  glib2-devel >= 2.12
BuildRequires:  gnutls-devel
Summary:        Support libraries for Open Vulnerability Assessment (OpenVAS) Server

%description
openvas-libraries is the base library for the OpenVAS network security scanner.

%package -n libopenvas_base%{soname}


Group:          System/Libraries
Summary:        Support libraries for OpenVAS

%description -n libopenvas_base%{soname}
The support libraries for the Open Vulnerability Assessment System (OpenVAS).

%package -n libopenvas_hg%{soname}


Group:          System/Libraries
Summary:        Support libraries for OpenVAS

%description -n libopenvas_hg%{soname}
The support libraries for the Open Vulnerability Assessment System (OpenVAS).

%package -n libopenvas_misc%{soname}


Group:          System/Libraries
Summary:        Support libraries for OpenVAS

%description -n libopenvas_misc%{soname}
The support libraries for the Open Vulnerability Assessment System (OpenVAS).

%package -n libopenvas_nasl%{soname}


Group:          System/Libraries
Summary:        Support libraries for OpenVAS

%description -n libopenvas_nasl%{soname}
The support libraries for the Open Vulnerability Assessment System (OpenVAS).

%package -n libopenvas_omp%{soname}


Group:          System/Libraries
Summary:        Support libraries for OpenVAS

%description -n libopenvas_omp%{soname}
The support libraries for the Open Vulnerability Assessment System (OpenVAS).

%package -n libopenvas-devel
License:        GPLv2
Group:          Development/Libraries/C and C++
Requires:       libopenvas_base%{soname} = %{version} libopenvas_hg%{soname} = %{version} libopenvas_misc%{soname} = %{version} libopenvas_nasl%{soname} = %{version} libopenvas_omp%{soname} = %{version}
Summary:        Development files for openvas-libraries

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


%prep
%setup -q
%patch0

%build
sed -i -e "s|@OPENVASLIBS_DATE@|$(stat --printf='"%y"' %{SOURCE0})|g" ./include/libvers.h.in  

%configure
%__make %{?_smp_mflags}

%install
%makeinstall
find %{buildroot}%{_libdir} -name "*.a" -delete

%post -n libopenvas_base%{soname} -p /sbin/ldconfig

%post -n libopenvas_hg%{soname} -p /sbin/ldconfig

%post -n libopenvas_misc%{soname} -p /sbin/ldconfig

%post -n libopenvas_nasl%{soname} -p /sbin/ldconfig

%post -n libopenvas_omp%{soname} -p /sbin/ldconfig

%postun -n libopenvas_base%{soname} -p /sbin/ldconfig

%postun -n libopenvas_hg%{soname} -p /sbin/ldconfig

%postun -n libopenvas_misc%{soname} -p /sbin/ldconfig

%postun -n libopenvas_nasl%{soname} -p /sbin/ldconfig

%postun -n libopenvas_omp%{soname} -p /sbin/ldconfig

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

%files -n libopenvas_base%{soname}
%defattr(-,root,root)
%{_libdir}/libopenvas_base.so.%{soname}*

%files -n libopenvas_hg%{soname}
%defattr(-,root,root)
%{_libdir}/libopenvas_hg.so.%{soname}*

%files -n libopenvas_misc%{soname}
%defattr(-,root,root)
%{_libdir}/libopenvas_misc.so.%{soname}*

%files -n libopenvas_nasl%{soname}
%defattr(-,root,root)
%{_libdir}/libopenvas_nasl.so.%{soname}*

%files -n libopenvas_omp%{soname}
%defattr(-,root,root)
%{_libdir}/libopenvas_omp.so.%{soname}*

%files -n libopenvas-devel
%defattr(-,root,root)
%doc CHANGES
%{_bindir}/libopenvas-config
%{_bindir}/openvas-nasl
%{_includedir}/openvas
%{_libdir}/libopenvas_base.so
%{_libdir}/libopenvas_hg.so
%{_libdir}/libopenvas_misc.so
%{_libdir}/libopenvas_nasl.so
%{_libdir}/libopenvas_omp.so
%{_mandir}/man1/libopenvas-config.1*
%{_mandir}/man1/openvas-nasl.1*
%{_datadir}/openvas
%{_datadir}/openvas/openvas-lsc-rpm-creator.sh

%changelog