File rkward.spec of Package rkward

#
# spec file for package rkward
#
# Copyright (c) 2012 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/
#


Name:           rkward
Version:        0.6.0
Release:        0
Summary:        Graphical frontend for R language
License:        GPL-2.0
Group:          Productivity/Scientific/Math
Summary(fr):    Interface graphique pour le langage R 

Url:            http://rkward.sourceforge.net/ 
Source0:        %{name}-%{version}.tar.gz
#Source0:        http://downloads.sourceforge.net/rkward/%{name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  R-base-devel
BuildRequires:  cmake
BuildRequires:  desktop-file-utils
BuildRequires:  gcc-fortran
BuildRequires:  gettext
BuildRequires:  kde4-filesystem
BuildRequires:  libkde4-devel
BuildRequires:  update-desktop-files
Requires:       R-base
Requires:       kdebase4-runtime

%description
RKWard aims to provide an easily extensible, easy to use IDE/GUI for the
R-project. RKWard tries to combine the power of the R-language with the
(relative) ease of use of commercial statistics tools. Long term plans
include integration with office suites

%description -l fr
RKWard fournis un environnement de développement graphique intégré
aisément extensible et simple d'utilisation. RKWard tente de
combiner la puissance du langage R et la (relative) simplicité d'utilisation
des outils statistiques commerciaux. L'objectif à long terme est de voir son
intégration dans les suites bureautiques.

%if %suse_version < 1120
%define _kde4_htmldir /usr/share/doc/kde/HTML/
%endif

%prep
%setup -q 

%build
%cmake_kde4 -d build
%make_jobs

%install
cd build
%makeinstall

desktop-file-install \
  --vendor="" \
  --dir=%{buildroot}%{kde4_datadir}/applications/kde4 \
  %{buildroot}%{_datadir}/applications/kde4/%{name}.desktop
%suse_update_desktop_file -n rkward

#This file is conflicting with the kdelibs one
rm -f $RPM_BUILD_ROOT%{_datadir}/kde4/apps/katepart/syntax/r.xml
# already in R-base package
rm -f $RPM_BUILD_ROOT%{_libdir}/R/library/R.css

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
touch --no-create %{_datadir}/icons/locolor
touch --no-create %{_datadir}/icons/crystalsvg

%postun
touch --no-create %{_datadir}/icons/locolor
touch --no-create %{_datadir}/icons/crystalsvg

%files -f build/%{name}.lang
%defattr(-,root,root,-)
%doc README COPYING TODO AUTHORS
%doc %{_mandir}/man1/rkward.1.gz
%dir %{_datadir}/doc/kde/HTML/en/rkwardplugins
%doc %{_datadir}/doc/kde/HTML/en/rkwardplugins/common
%doc %{_datadir}/doc/kde/HTML/en/rkwardplugins/index.cache.bz2
%doc %{_datadir}/doc/kde/HTML/en/rkwardplugins/index.docbook
%doc %{_datadir}/doc/kde/HTML/en/rkwardplugins/menu_hierarchy_example.png
%doc %{_datadir}/doc/kde/HTML/en/rkwardplugins/t_test_plugin_example.png
%{_libdir}/R/library/%{name}/
%{_libdir}/R/library/rkwardtests/
%{_datadir}/applications/kde4/%{name}.desktop
%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
%{_datadir}/icons/hicolor/22x22/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svgz
%{_bindir}/%{name}
%{_libdir}/kde4/libexec/
%{_datadir}/kde4/apps/%{name}/
%dir %{_datadir}/kde4/apps/katepart
%dir %{_datadir}/kde4/apps/katepart/syntax
%{_datadir}/kde4/apps/katepart/syntax/%{name}.xml
#%{_datadir}/kde4/config/%{name}.knsrc

%changelog
openSUSE Build Service is sponsored by