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 http://bugs.opensuse.org/
#


Name:           ruby-qt4
Version:        4.14.3
Release:        0
Summary:        QtRuby kdebindings library
License:        LGPL-2.1+
Group:          Development/Languages/Ruby
Url:            https://projects.kde.org/projects/kde/kdebindings/ruby/qtruby
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}
%endif

%description
Ruby bindings for the Qt4 libraries from the kdebindings project.

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

%build
  %cmake_kde4 -d build
  %make_jobs

%install
  cd build
  %kde4_makeinstall
  # 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

%files
%defattr(-,root,root)
%{_kde4_bindir}/rbqtapi
%{_kde4_bindir}/rbrcc
%{_kde4_bindir}/rbuic4
%{_kde4_libdir}/libqtruby4shared.so.*
%{rb_sitelibdir}/*.rb
%{rb_sitelibdir}/Qt/
%{rb_sitelibdir}/phonon/
%{rb_sitelibdir}/qtdeclarative/
%{rb_sitelibdir}/qtscript/
%{rb_sitelibdir}/qttest/
%{rb_sitelibdir}/qtuitools/
%{rb_sitelibdir}/qtwebkit/
%{rb_sitelibdir}/qscintilla/
%{rb_sitelibdir}/qwt/
%{rb_sitearchdir}/*.so

%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
%defattr(-,root,root)
%{_kde4_libdir}/libqtruby4shared.so
%{_includedir}/qtruby/
%{_datadir}/qtruby4/

%changelog