File gsd.spec of Package gsd

#
# spec file for package gsd
#
# Copyright (c) 2011 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:           gsd
Version:        1.2.0
Release:        2
License:        GPLv2+
Group:          Productivity/Networking/Security
Url:            http://www.openvas.org
Source:         %{name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  gcc-c++
BuildRequires:  glib2-devel
BuildRequires:  libopenvas-devel
BuildRequires:  libqt4-devel
BuildRequires:  pkgconfig
BuildRequires:  libgcrypt-devel
%if 0%{?fedora_version} > 13
BuildRequires:  qt-webkit-devel
%endif

%if 0%{?mandriva_version}
BuildRequires:  pinentry-gtk2
%endif

%if 0%{?suse_version}
BuildRequires:  libQtWebKit-devel
%endif

Summary:        A Desktop Client that connects to the OpenVAS Manager
Patch:          gsd-add-needed.patch

%description
GSD is a desktop client that connects to the OpenVAS Manager using
the OMP protocol.


%prep
%setup -q
%patch

%build
export CXXFLAGS="$RPM_OPT_FLAGS"

%__mkdir build
cd build
cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON \
        -DCMAKE_INSTALL_PREFIX=%{_prefix} \
        -DSYSCONFDIR=%{_sysconfdir} \
        -DLOCALSTATEDIR=%{_localstatedir} \
        -DCMAKE_BUILD_TYPE=Release
%__make %{?_smp_mflags} VERBOSE=1

%install
cd build
%__make install DESTDIR=%{buildroot} install

%__mkdir_p %{buildroot}%{_localstatedir}/log/openvas
touch %{buildroot}%{_localstatedir}/log/openvas/gsd.log

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

%files
%defattr(-,root,root)
%doc CHANGES README
%dir %{_sysconfdir}/openvas
%config(noreplace) %{_sysconfdir}/openvas/gsd_log.conf
%{_bindir}/gsd
%{_datadir}/openvas/dash_resources.html
%{_datadir}/openvas/dash_task.html
%{_datadir}/openvas/dash_task_count.html
%{_datadir}/openvas/dash_task_top5.html
%{_datadir}/openvas/dash_trend.html
%{_datadir}/openvas/dash_vulnerabilities.html
%dir %{_datadir}/openvas/translations
%{_datadir}/openvas/translations/gsd_??.qm
%{_mandir}/man8/gsd.8*
%dir %{_localstatedir}/log/openvas
%ghost %{_localstatedir}/log/openvas/gsd.log

%changelog
openSUSE Build Service is sponsored by