Blob Blame History Raw
%if 0%{?fedora} > 16
%global ruby_abi 1.9.1
%else
%global ruby_abi 1.8
%global ruby_vendorlibdir %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')
%global ruby_vendorarchdir %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')
%endif

Summary: Ruby bindings for Qt 4
Name:    ruby-qt
Version: 4.8.5
Release: 1%{?dist}

License: LGPLv2+
Group:   Development/Languages
URL:     https://projects.kde.org/projects/kde/kdebindings/ruby/qtruby
%global revision %(echo %{version} | cut -d. -f3)
%if %{revision} >= 50
%global stable unstable
%else
%global stable stable
%endif
Source0: http://download.kde.org/%{stable}/%{version}/src/qtruby-%{version}.tar.xz

BuildRequires: cmake
BuildRequires: pkgconfig(phonon)
BuildRequires: pkgconfig(qimageblitz)
BuildRequires: pkgconfig(QtCore) pkgconfig(QtScript) pkgconfig(QtTest) pkgconfig(QtUiTools)
BuildRequires: pkgconfig(QtWebKit)
BuildRequires: ruby-devel ruby
BuildRequires: qscintilla-devel
BuildRequires: qwt-devel
BuildRequires: smokeqt-devel >= %{version}

Obsoletes: QtRuby < 4.7.0
Provides: QtRuby = %{version}-%{release}
Provides: QtRuby4 = %{version}-%{release}
Provides: ruby(qt) = %{version}
Provides: qtruby = %{version}-%{release}
Provides: qtruby%{?_isa} = %{version}-%{release}

%{?ruby_abi:Requires: ruby(abi) = %{ruby_abi}}
%{?_qt4:Requires: qt4%{?_isa} >= %{_qt4_version}}
Requires: smokeqt%{?_isa} >= %{version}

%description
This package includes ruby bindings for Qt 4.

%package devel
Group: Development/Languages
Summary: Development files for QtRuby
Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: QtRuby-devel < 4.7.0
Provides: QtRuby-devel = %{version}-%{release}
Provides: QtRuby4-devel = %{version}-%{release}
Provides: qtruby-devel = %{version}-%{release}

%description devel
This package includes the header files you will need to compile
applications for Qt 4.

%package examples
Summary: Programming examples for %{name}
Group: Documentation
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description examples
%{summary}.


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

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_kde4} \
  -DCUSTOM_RUBY_SITE_ARCH_DIR:PATH=%{ruby_vendorarchdir} \
  -DCUSTOM_RUBY_SITE_LIB_DIR:PATH=%{ruby_vendorlibdir} \
  ..
popd

make %{?_smp_mflags} -C %{_target_platform}
 

%install
rm -rf %{buildroot}
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
 

%clean
rm -rf %{buildroot}
 

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
 
%files
%defattr(-, root, root, 0755)
%doc AUTHORS COPYING COPYING.LIB ChangeLog INSTALL README
%{_libdir}/libqtruby4shared.so.2*
%{ruby_vendorarchdir}/*.so
%{ruby_vendorlibdir}/phonon/
%{ruby_vendorlibdir}/qscintilla/
%{ruby_vendorlibdir}/qtdeclarative/
%{ruby_vendorlibdir}/qwt/
%{ruby_vendorlibdir}/Qt/
%{ruby_vendorlibdir}/Qt*.rb
%{ruby_vendorlibdir}/qtscript/
%{ruby_vendorlibdir}/qttest/
%{ruby_vendorlibdir}/qtuitools/
%{ruby_vendorlibdir}/qtwebkit/

%files devel
%defattr(-, root, root, 0755)
%{_bindir}/rbqtapi
%{_bindir}/rbrcc
%{_bindir}/rbuic4
%dir %{_datadir}/qtruby4/
%{_datadir}/qtruby4/cmake/
%{_libdir}/libqtruby4shared.so
%{_includedir}/qtruby/

%files examples
%defattr(-, root, root, 0755)
%doc examples


%changelog
* Thu Aug 02 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.8.5-1
- 4.8.5

* Tue Jun 05 2012 Than Ngo <than@redhat.com> - 4.8.4-1
- 4.8.4

* Mon Apr 30 2012 Jaroslav Reznik <jreznik@redhat.com> - 4.8.3-1
- 4.8.3

* Fri Mar 30 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.8.2-1
- 4.8.2

* Tue Mar 06 2012 Radek Novacek <rnovacek@redhat.com> 4.8.1-1
- 4.8.1

* Wed Feb 08 2012 Jaroslav Reznik <jreznik@redhat.com> 4.8.0-3
- proper rebuild for ruby-1.9.x (use ruby macros for dirs)

* Tue Feb 07 2012 Rex Dieter <rdieter@fedoraproject.org> 4.8.0-2
- rebuild for ruby-1.9.x (f17)

* Sun Jan 22 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.8.0-1
- 4.8.0

* Wed Jan 04 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.7.97-1
- 4.7.97

* Sat Dec 24 2011 Rex Dieter <rdieter@fedoraproject.org> 4.7.95-2
- rebuild (qscintilla)

* Thu Dec 22 2011 Radek Novacek <rnovacek@redhat.com> - 4.7.95-1
- 4.7.95

* Tue Dec 20 2011 Rex Dieter <rdieter@fedoraproject.org> 4.7.90-1
- 4.7.90

* Tue Sep 06 2011 Than Ngo <than@redhat.com> - 4.7.1-1
- 4.7.1

* Tue Aug 02 2011 Than Ngo <than@redhat.com> - 4.7.0-1
- 4.7.0