File ruby-qt4.spec of Package ruby-qt4

# spec file for package ruby-qt4
# 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

Name:           ruby-qt4
Version:        4.14.3
Release:        0
Summary:        QtRuby kdebindings library
License:        LGPL-2.1+
Group:          Development/Languages/Ruby
Source0:        qtruby-%{version}.tar.xz
BuildRequires:  cmake
BuildRequires:  kde4-filesystem
BuildRequires:  libQtWebKit-devel
BuildRequires:  libqimageblitz-devel
BuildRequires:  libqscintilla-devel
BuildRequires:  libsmokegen-devel
BuildRequires:  libsmokeqt-devel
BuildRequires:  phonon-devel
BuildRequires:  qwt-devel
BuildRequires:  ruby-devel
BuildRequires:  sqlite-devel
BuildRequires:  xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%if 0%{?suse_version} <= 1210
%define rb_sitelibdir %{rb_sitelib}
%define rb_sitearchdir %{rb_sitearch}

Ruby bindings for the Qt4 libraries from the kdebindings project.

%setup -q -n qtruby-%{version}

  %cmake_kde4 -d build

  cd build
  # add missing executable bits on scripts
  chmod +x %{buildroot}%{rb_sitelibdir}/qwt/qwt.rb
  chmod +x %{buildroot}%{rb_sitelibdir}/qtdeclarative/qtdeclarative.rb
  chmod +x %{buildroot}%{rb_sitelibdir}/phonon/phonon.rb
  chmod +x %{buildroot}%{rb_sitelibdir}/qscintilla/qscintilla.rb
  chmod +x %{buildroot}%{rb_sitelibdir}/qtuitools/qtuitools.rb
  chmod +x %{buildroot}%{rb_sitelibdir}/qtwebkit/qtwebkit.rb

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%package devel
Summary:        Development libraries for Ruby-Qt4
Group:          Development/Languages/Ruby
Requires:       %{name} = %{version}

%description devel
This package contains development files for the Ruby bindings for the Qt4 libraries.

%files devel