
## falcon (still) not functional
#define kross_falcon 1
# Only compatible with ruby-1.9.x currently
%define kross_ruby 1
%global ruby_abi 1.9.1
%define kross_java 1

Name:    kross-interpreters 
Summary: Kross interpreters 
Summary(ja): Kross インタプリタ集
Version: 4.14.3
Release: 1%{?_dist_release}

License: LGPLv2+
Group:   System Environment/Libraries
URL:     http://developer.kde.org/language-bindings/

Source0: http://download.kde.org/stable/%{version}/src/%{name}-%{version}.tar.xz

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: kdelibs4-devel >= %{version} 
%if 0%{?kross_falcon}
BuildRequires: Falcon-devel
%endif
%if 0%{?kross_java}
BuildRequires: java-devel
%endif
%if 0%{?kross_ruby}
BuildRequires: ruby-devel ruby
%endif
BuildRequires: python-devel

%description
%{summary}.

%package -n kross-python
Summary:  Kross plugin for python
Summary(ja): Python 用 Kross プラグイン
Group:    System Environment/Libraries
Requires: kdelibs4 >= %{version}
Provides: kross(python) = %{version}-%{release}

%description -n kross-python
Python plugin for the Kross architecture in KDE.

%package -n kross-falcon
Summary:  Kross plugin for falcon
Summary(ja): Falcon 用 Kross プラグイン
Group:    System Environment/Libraries
Requires: Falcon
Requires: kdelibs4 >= %{version}
Provides: kross(falcon) = %{version}-%{release}

%description -n kross-falcon
Falcon plugin for the Kross architecture in KDE.

%package -n kross-java
Summary:  Kross plugin for java 
Summary(ja): Java 用 Kross プラグイン
Group:    System Environment/Libraries
Requires: kdelibs4 >= %{version}
Provides: kross(java) = %{version}-%{release}

%description -n kross-java
Java plugin for the Kross architecture in KDE.

%package -n kross-ruby
Summary:  Kross plugin for ruby
Summary(ja): Ruby 用 Kross プラグイン
Group:    System Environment/Libraries
#{?ruby_abi:Requires: ruby(abi) = %{ruby_abi}}
Requires: kdelibs4 >= %{version}
Provides: kross(ruby) = %{version}-%{release}

%description -n kross-ruby
Ruby plugin for the Kross architecture in KDE.


%prep
%setup -q

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%cmake \
    -DCMAKE_BUILD_TYPE=release \
    -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
    -DDATA_INSTALL_DIR:PATH=%{_datadir}/kde4/apps \
    -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/kde4 \
    -DLIBEXEC_INSTALL_DIR:PATH=%{_libexecdir}/kde4 \
    -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \
    ..
popd
#   -DCUSTOM_RUBY_SITE_ARCH_DIR:PATH=%{ruby_arch} \
#   -DCUSTOM_RUBY_SITE_LIB_DIR:PATH=%{ruby_lib} \

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


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


%clean
rm -rf %{buildroot}


%files -n kross-python
%defattr(-,root,root,-)
%{_libdir}/kde4/krosspython.so

%if 0%{?kross_falcon}
%files -n kross-falcon
%defattr(-,root,root,-)
%{_libdir}/kde4/krossfalcon.so
%endif

%if 0%{?kross_java}
%files -n kross-java
%defattr(-,root,root,-)
%{_libdir}/kde4/krossjava.so
%{_libdir}/kde4/kross/kross.jar
%endif

%if 0%{?kross_ruby}
%files -n kross-ruby
%defattr(-,root,root,-)
%{_libdir}/kde4/krossruby.so
%endif


%changelog
* Sun Jan  4 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.14.3-1
- new upstream release

* Sun Nov  9 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.12.5-1
- splitted from kdebindings
- enabled kross-java package

* Thu Jun 16 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.4-1
- new upstream release

* Thu Apr 14 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.1-1
- updated to 4.6.1
- added BR: kdesdk-devel
- disabled attica plugins temporaly
- rebuilt with mono-2.10.1

* Sun Sep 26 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.5.1-2
- rebuilt with rpm-4.8.1 for pkg-config

* Sat Sep 18 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.5.1-1
- new upstream release
- added Patch50
- added more japanese summaries

* Tue Aug 17 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.5.0-1
- new upstream release

* Sun Jul  4 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.5-1
- new upstream release

* Fri May  7 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.3-1
- new upstream release

* Thu Apr 15 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.2-1
- new upstream release

* Tue Mar  9 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.1-1
- new upstream release
- added -DCMAKE_SKIP_RPATH:BOOL=OFF option to cmake
  (see https://bugs.kde.org/show_bug.cgi?id=214824)
- built with new toolchain

* Wed Nov 25 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.3-1
- new upstream release

* Thu Oct 29 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.2-4
- merged 4.3.1-2 %changelog 
- re-define %%{mono_dir} to %{_prefix}/lib/mono (again)

* Tue Oct 27 2009 Shu KONNO <owa@bg.wakwak.com> 4.3.2-3
- use %%{_prefix}/lib for mono-dll (for x86_64)

* Tue Oct 27 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.2-2
- new upstream release
- built with PyQt4-4.6

* Sun Sep 06 2009 NAKAMURA Kenta <kenta@vinelinux.org> 4.3.1-2
- define %%{mono_dir} to specify mono library install path

* Sun Sep  6 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.1-1
- new upstream release
- fixed ruby modules installation path

* Thu Aug 20 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.0-1
- new upstream release
- spilt sub package based on Fedora

* Mon May 11 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.5.8-1
- applied new versioning policy
- added Patch1 
  (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=484191)

* Fri Nov 23 2007 NAKAMURA Kenta <kenta@vinelinux.org> 3.5.8-0vl3
- added --with-qt-libraries option

* Mon Oct 29 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.8-0vl2
- rebuild for VineSeed

* Mon Oct 29 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.8-0vl1
- new upstream release

* Mon Jun 25 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.7-0vl2
- rebuild for VineSeed

* Thu May 31 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.7-0vl1
- new upstream release
- update Patch0
- drop Patch1

* Mon Jan 29 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.6-0vl1
- new upstream release
- add Patch1
- add --enable-libsuffix option

* Tue Oct  3 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.5-0vl2
- rebuild for VineSeed

* Tue Oct  3 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.5-0vl1
- new upstream release

* Wed Aug  2 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.4-0vl2
- rebuild for VineSeed

* Wed Aug  2 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.4-0vl1
- new upstream release

* Thu Jun  1 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.3-0vl2
- rebuild for VineSeed

* Thu Jun  1 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.3-0vl1
- new upstream release

* Wed Mar 22 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.2-0vl2
- rebuild for VineSeed

* Wed Mar 22 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.2-0vl1
- new upstream release

* Wed Feb  1 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.1-0vl2
- rebuild for VineSeed

* Wed Feb  1 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.1-0vl1
- new upstream release
- renew BuildPrereq and build section
- renew %%files
- enable python
- change spec to make main and devel package
- add BuildPrereq: ruby ruby-devel
- add Patch0 to install ruby-bindings under /usr/lib/ruby

* Sun Mar 17 2002 AKIYAMA Kazuhito <akiyama@karen.servepics.com> 2.2.2-1vl1
- build for VineSeed
- disable python and mozilla
- objprelink (i386 only)

* Wed Nov 21 2001 Than Ngo <than@redhat.com> <bero@redhat.com> 2.2.2-1
- 2.2.2
- build kmozilla binding only on x86/alpha

* Thu Aug  9 2001 Bernhard Rosenkraenzer <bero@redhat.com> 2.2-2
- Make sure %%{name}-kmozilla isn't built on ia64

* Mon Jul 23 2001 Bernhard Rosenkraenzer <bero@redhat.com> 2.2-0.cvs20010723.2
- Move python bindings to separate package
- Add perl bindings
- Shut up rpmlint

* Wed Feb 21 2001 Bernhard Rosenkraenzer <bero@redhat.com>
- 2.1

* Sun Jan 28 2001 Bernhard Rosenkraenzer <bero@redhat.com>
- initial RPM
