Blob Blame History Raw
# FIXME/TODO: BRs for Java (krossjava), C# (qyoto, kimono) and PHP (php-qt) support?
# IMHO this one really needs to be split into subpackages, we don't want to pull
# in e.g. the whole Ruby, OpenJDK and Mono stacks for a PyKDE app! -- Kevin
# FIXME/TODO: Do we want to enable the optional Ruby bindings which are off by
# default? There are bindings for QScintilla, Plasma and Nepomuk/Soprano. -- Kevin

# define to enable these optional bits
#define csharp 1
%define ruby 1
%define smoke 1
#define php 1

%if 0%{?ruby}%{?smoke}
%define devel 1
%endif

%{!?ruby_sitelib: %define ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')}
%{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')}
%global python_ver %(%{__python} -c "import sys ; print sys.version[:3]")
%global python_sitelib  %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")

Name: kdebindings
Version: 4.1.0
Release: 1%{?dist}
Summary: KDE bindings to non-C++ languages

Group: User Interface/Desktops
License: GPLv2
URL: http://developer.kde.org/language-bindings/
Source0: ftp://ftp.kde.org/pub/kde/unstable/%{version}/src/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: kdebindings-4.1.0-kate.patch

BuildRequires:  kde-filesystem >= 4
BuildRequires:  kdelibs4-devel >= %{version}
BuildRequires:  kdebase-workspace-devel >= %{version}
BuildRequires:  kdegraphics4-devel >= %{version}
BuildRequires:  soprano-devel >= 2.0.97
BuildRequires:  cmake
%{?csharp:BuildRequires:  mono-core}
BuildRequires:  python-devel
%{?ruby:BuildRequires:  ruby-devel ruby}
BuildRequires:  giflib-devel
BuildRequires:  pcre-devel
# causes smokeqt to fail to build
#{?smoke:BuildRequires:  qwt-devel}
BuildRequires:  PyQt4-devel >= 4.4.2
%if 0%{?fedora} > 8
BuildRequires:  qscintilla-devel >= 2
%endif

# FIXME/TODO: are there other explicit Requires?
Requires: kdelibs4 >= %{version}
Requires: kdebase-workspace >= %{version}

%{!?devel:Obsoletes: kdebindings-devel < %{version}-%{release}}

%description
KDE bindings to non-C++ languages

%package -n PyKDE4 
Group:    Development/Languages
Summary:  Python bindings for KDE4 
Requires: kdelibs4 >= %{version}
Requires: PyQt4
%description -n PyKDE4 
Header files for developing applications using %{name}.

%package -n PyKDE4-devel
Group:    Development/Languages
Summary:  Files needed to build other bindings based on KDE4 
Requires: PyQt4-devel
Requires: PyKDE4 = %{version}-%{release}
%description -n PyKDE4-devel 
Files needed to build other bindings for C++ classes that inherit from any
of the KDE4 classes.

%package devel
Group:    Development/Libraries
Summary:  Header files for %{name}
Requires: %{name} = %{version}-%{release}
Requires: kdelibs4-devel kdebase-workspace-devel
%description devel
Header files for developing applications using %{name}.


%prep
%setup -q

%patch0 -p1 -b .kate

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
# FIXME/TODO: Get csharp to compile
%{cmake_kde4} \
  %{!?csharp:-DBUILD_csharp=OFF} \
  %{!?php:-DBUILD_php=OFF} \
  %{!?ruby:-DBUILD_ruby=OFF} %{?ruby:-DRUBY_SITE_LIB_DIR=%{ruby_sitelib} -DRUBY_SITE_ARCH_DIR=%{ruby_sitearch}} \
  %{!?smoke:-DBUILD_smoke=OFF} \
  ..
popd

# smp build not recommended (upstream)
make -C %{_target_platform}


%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
make install DESTDIR=%{buildroot} -C %{_target_platform}


%clean
rm -rf %{buildroot}


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%if 0%{?smoke}
%{_kde4_libdir}/lib*.so.*
%endif
# unversioned library
%{_kde4_libdir}/kde4/krosspython.so
%if 0%{?ruby}
%{_kde4_bindir}/*
%{_kde4_libdir}/libqtruby4shared.so
%{_kde4_libdir}/kde4/krossruby.so
%{_kde4_libdir}/kde4/krubypluginfactory.so
%{ruby_sitelib}/*
%{ruby_sitearch}/*.so
%{_kde4_datadir}/applications/kde4/dbpedia_references.desktop
%{_kde4_appsdir}/dbpedia_references/
%endif

%files -n PyKDE4
%defattr(-,root,root,-)
%doc COPYING
%{python_sitearch}/PyKDE4/
%{_kde4_appsdir}/pykde4/

%files -n PyKDE4-devel
%defattr(-,root,root,-)
%doc %{_kde4_docdir}/HTML/en/pykde4/
%{_kde4_datadir}/sip/PyKDE4/

%if 0%{?devel}
%files devel
%defattr(-,root,root,-)
%if 0%{?smoke}
%{_includedir}/smoke.h
%{_includedir}/smoke/
%{_kde4_libdir}/lib*.so
%endif
%if 0%{?ruby}
%{_includedir}/qtruby/
%exclude %{_kde4_libdir}/libqtruby4shared.so
%endif
%endif


%changelog
* Wed Jul 23 2008 Than Ngo <than@redhat.com> 4.1.0-1
- 4.1.0

* Fri Jul 18 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.99-1
- 4.0.99

* Mon Jul 14 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.98-3
- re-enable smoke (patched), ruby

* Mon Jul 14 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.98-2
- omit smoke, ruby bindings (build failures, sorting out upstream)
- -devel: -BR: PyQt4-devel

* Fri Jul 11 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.98-1
- 4.0.98

* Sun Jul 06 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.85-1
- 4.0.85

* Sat Jun 28 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.84-2
- fix Python bindings for Phonon and Soprano

* Fri Jun 27 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.84-1
- 4.0.84

* Sat Jun 21 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.83-4
- fix PyKDE4-devel to require PyKDE4 rather than itself

* Sat Jun 21 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.83-3
- reenable Ruby again
- add missing Epoch for minimum kdegraphics-devel version requirement
- fix CMake target name conflict between Ruby and Python bindings
- fix file list for Ruby

* Fri Jun 20 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.83-2
- reenable smoke again (keep ruby off for now)
- drop explicit ENABLE_SMOKEKDEVPLATFORM=OFF (now off by default)
- add BR kdegraphics-devel for the Smoke Okular bindings
- fix file list

* Thu Jun 19 2008 Than Ngo <than@redhat.com> 4.0.83-1
- 4.0.83 (beta2)

* Wed Jun 18 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.82-3
- revert, more borkage.

* Tue Jun 17 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.82-2
- reenable smoke and ruby, set ENABLE_SMOKEKDEVPLATFORM=OFF (no kdevplatform)

* Sun Jun 15 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.82-1
- 4.0.82
- omit ruby, smoke (busted) => no -devel subpkg (for now)
- PyKDE4(-devel) subpkgs

* Tue May 27 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.80-2
- disable php-qt for now
- apply PyKDE4 and smokekde build fixes from upstream
- update file lists (comment out smokeplasma, add new smoke/ruby files)
- fix incorrect libdir on lib64 platforms

* Mon May 26 2008 Than Ngo <than@redhat.com> 4.0.80-1
- 4.1 beta1

* Wed May 07 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.72-1
- update to 4.0.72
- add BR soprano-devel
- update file list to include plasma-ruby stuff

* Thu Apr 03 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.3-3
- rebuild (again) for the fixed %%{_kde4_buildtype}

* Mon Mar 31 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.3-2
- Rebuild for NDEBUG

* Fri Mar 28 2008 Than Ngo <than@redhat.com> 4.0.3-1
- 4.0.3

* Mon Mar 03 2008 Than Ngo <than@redhat.com> 4.0.2-5
- respin

* Sat Mar 01 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.2-3
- apply upstream build fixes for Qt 4.3.4 (rev 780996)
- remove no longer existing protected KService::accessServiceTypes from PyKDE4

* Fri Feb 29 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.2-2
- drop lib64 patches (fixed upstream)

* Thu Feb 28 2008 Than Ngo <than@redhat.com> 4.0.2-1
- 4.0.2

* Thu Jan 31 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.1-1
- 4.0.1
- Provides: PyKDE4(-devel)
- BR: qscintilla-devel >= 2

* Tue Jan 08 2008 Rex Dieter <rdieter[AT]fedoraproject.org> 4.0.0-1
- kde-4.0.0

* Thu Jan 03 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 3.97.0-8
- smoke.h is in %%{_includedir}, not %%{_kde4_includedir}

* Wed Dec 12 2007 Kevin Kofler <Kevin@tigcc.ticalc.org> 3.97.0-7
- rebuild for changed _kde4_includedir

* Tue Dec 11 2007 Kevin Kofler <Kevin@tigcc.ticalc.org> 3.97.0-6
- use patch to override PYTHON_SITE_PACKAGES_DIR (cmake -D doesn't work)

* Tue Dec 11 2007 Kevin Kofler <Kevin@tigcc.ticalc.org> 3.97.0-5
- override PYTHON_SITE_PACKAGES_DIR

* Tue Dec 11 2007 Kevin Kofler <Kevin@tigcc.ticalc.org> 3.97.0-4
- rewrite libsmokeqt-lib64 patch so it actually works
- add PyKDE4 files to file list
- specify minimum versions of sip-devel and PyQt4-devel
- require PyQt4 in main package, PyQt4-devel in -devel
- fix unowned Qt and KDE directories under ruby_sitelib

* Tue Dec 11 2007 Kevin Kofler <Kevin@tigcc.ticalc.org> 3.97.0-3
- omit BR: qwt-devel for now, causes build failure in smokeqt
- add BRs: sip-devel PyQt4-devel for PyKDE4

* Tue Dec 11 2007 Kevin Kofler <Kevin@tigcc.ticalc.org> 3.97.0-2
- remove X11 BRs now Required by kdelibs-devel
- add BR: qwt-devel
- fix libsmokeqt being in /usr/lib even on 64-bit arches
- use ruby_sitelib and ruby_sitearch properly

* Mon Dec 10 2007 Than Ngo <than@redhat.com> 3.97.0-1
- 3.97.0

* Sun Nov 18 2007 Sebastian Vahl <fedora@deadbabylon.de> 3.96.0-1
- Initial version for Fedora