LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File qtoctave.spec of Package qtoctave (Project home:stecue)

#
# spec file for package qtoctave
#
# Copyright (c) 2014 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:           qtoctave
Version:        0.10.1
Release:        0
Summary:        Frontend for Octave
License:        GPL-2.0
Group:          Productivity/Engineering
Url:            http://qtoctave.wordpress.com/
Source:         http://forja.rediris.es/frs/download.php/1760/%{name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  octave-devel >= 3.2.0
BuildRequires:  config(hdf5-devel)
BuildRequires:  pkgconfig(QtWebKit)
BuildRequires:  pkgconfig(QtCore) >= 4.6.0
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  update-desktop-files
BuildRequires:  fdupes
BuildRequires:  cmake
BuildRequires:  hicolor-icon-theme
Requires:       octave >= 3.2.0
# place qtoctave_doc in qtoctave datadir
Patch0:         qtoctave-doc-path.patch

%description
QtOctave is a frontend for Octave based on Qt4.

%prep
%setup -q
%patch0 -p1

find xmlwidget/qt4/src/ -type f -exec chmod a-x {} \;
find easy_plot/src/ -type f -exec chmod a-x {} \;

%build
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
      -DBUILD_SHARED_LIBS:BOOL=ON \
      -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG"        \
      -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DQT_NO_DEBUG" \
      -DCMAKE_SKIP_RPATH:STRING="ON"                   \
      .
make VERBOSE=1 %{?_smp_mflags}


%install
make install DESTDIR=%{buildroot}

%suse_update_desktop_file %{name} Education Science

%fdupes %{buildroot}%{_datadir}

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root,-)
%doc readme.txt LICENSE_GPL.txt
%{_bindir}/%{name}
%{_bindir}/easy_plot
%{_bindir}/qtoctave-info-reader
%{_bindir}/qtjs
%{_bindir}/qtoctave_pkg
%{_bindir}/simplercs
%{_bindir}/xmlwidget
%{_datadir}/%{name}
%{_datadir}/applications/qtoctave.desktop
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
%exclude %{_datadir}/doc/octave-html

%changelog