Blob Blame History Raw
%define debug 0
%define final 0

%define appdir %{_datadir}/applications/kde

## stil need fix to build java -> disable java at the moment
##define support_arch %{ix86} alpha ia64 ppc
%define support_arch none

%define mozilla_archs %{ix86} ppc s390 s390x x86_64

%{expand: %%define pythonver %(python -c 'import sys;print(sys.version[0:3])')}
%define mozilla_version 1.7.10
%define qt_version 3.3.6
%define arts_version 1.5.3
%define kdelibs_epoch 6
%define kdebase_epoch 6
%define perlver 5.8
%define perlepoch 3
%define rubyver 1.8

%define arts 1
%define perl 1
%define python 1
%define ruby 1
%define pyqt 0

%define disable_gcc_check_and_hidden_visibility 1

Version: 3.5.3
Release: 1.1
Name: kdebindings
Summary: KDE bindings to non-C++ languages
URL: http://www.kde.org/
License: GPL
Group: User Interface/Desktops
Prefix: %{_prefix}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

Source: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/%{name}-%{version}.tar.bz2

Patch4: kdebindings-3.1-ssl-krb5.patch
Patch6: kdebindings-3.1-python2.4.patch
Patch7: kde-libtool.patch
Patch8: kdebindings-3.3.0-python.patch
Patch9: kdebindings-3.3.92-xdg.patch

BuildRequires: zlib-devel
BuildRequires: kdelibs-devel
BuildRequires: arts-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: automake
BuildRequires: /usr/bin/desktop-file-install

%if %{perl}
BuildRequires: perl >= %{perlver}
Requires: perl >= %{perlepoch}:%{perlver}
%endif

%if %{python}
BuildRequires: python >= %{pythonver}
BuildRequires: python-devel >= %{pythonver}
Requires: python-abi = %{pythonver}
%endif

%if %{ruby}
BuildRequires: ruby >= %{rubyver}
BuildRequires: ruby-devel >= %{rubyver}
Requires: ruby >= %{rubyver}
%endif

Requires(post,postun): /sbin/ldconfig
Requires: kdelibs >= %{kdelibs_epoch}:%{version}
Requires: kdebase >= %{kdebase_epoch}:%{version}

%description
KDE/DCOP bindings to non-C++ languages

%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: kdelibs-devel >= %{kdelibs_epoch}:%{version}

%description devel
Development files for the KDE bindings.

Install %{name}-devel if you want to develop non-KDE
applications that talk to KDE.

%ifarch %{mozilla_archs}
%package kmozilla
Summary: KDE bindings to mozilla
Group: User Interface/Desktops
Requires: mozilla
Requires: kdebase >= %{kdebase_epoch}:%{version}

%description kmozilla
KDE bindings to mozilla - embed Mozilla in Konqueror
%endif

%package perl
Summary: Perl bindings to DCOP
Group: Development/Libraries
Requires: kdelibs >= %{kdelibs_epoch}:%{version}
Requires: perl >= 5.6.0

%description perl
Perl bindings to the DCOP interprocess communication protocol used by KDE

%package python
Summary: Python bindings to DCOP
Group: Development/Libraries
Requires: kdelibs >= %{kdelibs_epoch}:%{version}
Requires: python-abi = %{pythonver}

%description python
Python bindings to the DCOP interprocess communication protocol used by KDE

%ifarch %{support_arch}
%package qtjava
Summary: Java bindings to Qt
Group: System Environment/Libraries
Requires: qt >= %{qt_version}
Requires: libgcj >= 3.1
Requires: jdkgcj >= 0.2.2
BuildRequires: gcc-java >= 3.1
BuildRequires: libgcj >= 3.1
BuildRequires: jdkgcj >= 0.2.2

%description qtjava
Java bindings to Qt.
%endif

%package qtc
Summary: C bindings to Qt
Group: System Environment/Libraries
Requires: qt >= 1:%{qt_version}

%description qtc
C bindings to Qt.
Install kdebindings-qtc if you wish to develop Qt applications
in C (rather than C++).

%package kdec
Summary: C bindings to KDE
Group: System Environment/Libraries
Requires: qt >= 1:%{qt_version}
Requires: %{name}-qtc >= 3.0.2

%description kdec
C bindings to KDE.
Install kdebindings-kdec if you wish to develop Qt applications
in C (rather than C++).

%ifarch %{support_arch}
%package kdejava
Summary: Java bindings to KDE
Group: Development/Libraries
Requires: kdelibs >= %{kdelibs_epoch}:%{version}
Requires: kdebindings-qtjava = %{version}-%{release}
Requires: libgcj

%description kdejava
Java bindings to KDE
%endif

%prep
%setup -q
%patch4 -p1 -b .ssl-krb5
%patch6 -p1 -b .python2
%patch7 -p1 -b .libtool

# don't build sip/pyqt, we have separates packages
%if %{pyqt} == 0
%patch8 -p1 -b .python
rm -rf python
%endif
%patch9 -p1 -b .xdg

%build
unset QTDIR && . /etc/profile.d/qt.sh

export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"

%ifarch %{support_arch}
export CFLAGS="$CFLAGS `mozilla-config --cflags`"
export CXXFLAGS="$CXXFLAGS `mozilla-config --cflags`"
export CPPFLAGS="$CPPFLAGS `mozilla-config --cflags`"
export LDFLAGS="$LDFLAGS `mozilla-config --libs`"
%endif

make -f admin/Makefile.common cvs

suffix=""
if [ "%{_lib}" == "lib64" ] ; then
   suffix="64"
fi

%configure \
%if 0
   --enable-new-ldflags \
%endif
   --disable-dependency-tracking \
   --disable-rpath \
   --enable-libsuffix="$suffix" \
   --includedir=%{_includedir}/kde \
   --with-qt-libraries=$QTDIR/lib \
%if %{disable_gcc_check_and_hidden_visibility}
   --disable-gcc-hidden-visibility \
%endif
%if %{arts} == 0
   --without-arts \
%endif
%if %{final}
   --enable-final \
%endif
%if %{debug} == 0
   --disable-debug \
   --disable-warnings \
%endif
%ifarch %{support_arch}
   --with-java=%{prefix}
%else
   --without-java
%endif

make #%{?_smp_mflags}

%install
rm -rf %{buildroot}

make install DESTDIR=%{buildroot}

desktop-file-install \
   --vendor "" \
   --dir %{buildroot}%{appdir} \
   --delete-original \
   --add-only-show-in KDE \
   %{buildroot}%{appdir}/kjscmd.desktop \
   %{buildroot}%{appdir}/embedjs.desktop

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_libdir}/*.so*
%{_libdir}/*.la
%{_libdir}/kde3/*
%{_datadir}/applications/kde/*
%{_datadir}/apps/embedjs
%{_datadir}/apps/kate/scripts/*
%{_datadir}/apps/kjsembed
%{_datadir}/icons/*/*/*/*
%{_datadir}/services/*
%{_datadir}/servicetypes/*
%{_bindir}/*
%if %{ruby}
%{_prefix}/lib*/ruby/site_ruby/%{rubyver}/*
%endif
%if %{python}
%{_libdir}/python*
%endif
%{_libdir}/perl5
%ifarch %{support_arch}
%{_libdir}/java
%doc %{_docdir}/javalib
%endif

%files devel
%defattr(-,root,root)
%{_includedir}/kde/*
%{_mandir}/man*/*

%changelog
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 3.5.3-1.1
- rebuild

* Sat Jun 03 2006 Than Ngo <than@redhat.com> 3.5.3-1
- update to 3.5.3

* Tue May 23 2006 Than Ngo <than@redhat.com> 3.5.2-2
- fix build problem with ruby

* Wed Apr 05 2006 Than Ngo <than@redhat.com> 3.5.2-1
- update to 3.5.2

* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 3.5.1-1.2
- bump again for double-long bug on ppc(64)

* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 3.5.1-1.1
- rebuilt for new gcc4.1 snapshot and glibc changes

* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt

* Tue Nov 29 2005 Than Ngo <than@redhat.com> 3.5.0-1
- 3.5 final

* Tue Oct 25 2005 Than Ngo <than@redhat.com> 3.4.92-1
- update to 3.5 beta2

* Mon Oct 10 2005 Than Ngo <than@redhat.com> 3.4.91-1
- update to 3.5 beta 1

* Tue Aug 09 2005 Than Ngo <than@redhat.com> 3.4.2-1
- update to 3.4.2

* Tue Jun 28 2005 Than Ngo <than@redhat.com> 3.4.1-1
- 3.4.1

* Fri Mar 18 2005 Than Ngo <than@redhat.com> 3.4.0-1
- 3.4.0

* Sat Mar 05 2005 Than Ngo <than@redhat.com> 3.4.0-0.rc1.2
- fix gcc4 build problem

* Mon Feb 28 2005 Than Ngo <than@redhat.com> 3.4.0-0.rc1.1
- KDE 3.4.0 rc1

* Tue Feb 22 2005 Than Ngo <than@redhat.com> 3.3.92-0.1
- KDE 3.4 beta2 

* Fri Dec 03 2004 Than Ngo <than@redhat.com> 3.3.2-0.1
- update to 3.3.2

* Fri Nov 19 2004 Than Ngo <than@redhat.com> 3.3.1-4
- add missing requires on python-abi

* Thu Nov 18 2004 Than Ngo <than@redhat.com> 3.3.1-3
- rebuilt against python 2.4

* Mon Oct 18 2004 Than Ngo <than@redhat.com> 3.3.1-2
- rebuilt

* Wed Oct 13 2004 Than Ngo <than@redhat.com> 3.3.1-1
- update to 3.3.1

* Fri Oct 08 2004 Than Ngo <than@redhat.com> 3.3.0-3
- add buildrequires on ruby and ruby-devel #135053

* Thu Sep 02 2004 Than Ngo <than@redhat.com> 3.3.0-2
- get rid of pyqt/sip, separates packages

* Mon Aug 23 2004 Than Ngo <than@redhat.com> 3.3.0-1
- update to 3.3.0 release

* Tue Aug 10 2004 Than Ngo <than@redhat.com> 3.3.0-0.1.rc2
- update to 3.3.0 rc2

* Mon Jun 21 2004 Than Ngo <than@redhat.com> 3.2.3-2
- build with -O0 on ia64, temporary gcc3.4 workaround 

* Sat Jun 19 2004 Than Ngo <than@redhat.com> 3.2.3-1
- update to 3.2.3

* Wed Jun 02 2004 Than Ngo <than@redhat.com> 3.2.2-2
- remove -O0 on ia64

* Tue Apr 13 2004 Than Ngo <than@redhat.com> 3.2.2-1
- 3.2.2 release

* Sun Mar 07 2004 Than Ngo <than@redhat.com> 3.2.1-1
- 3.2.1 release

* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Tue Feb 17 2004 Than Ngo <than@redhat.com> 3.2.0-1.4
- fix typo bug, _smp_mflags instead smp_mflags

* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Thu Feb 05 2004 Than Ngo <than@redhat.com> 3.2.0-0.3
- 3.2.0 release
- built against qt 3.3.0

* Mon Jan 19 2004 Than Ngo <than@redhat.com> 3.1.95-0.1
- KDE 3.2 RC1

* Mon Dec 01 2003 Than Ngo <than@redhat.com> 3.1.94-0.1
- KDE 3.2 Beta2

* Wed Nov 12 2003 Than Ngo <than@redhat.com> 3.1.93-0.1
- KDE 3.2 Beta1
- remove some unneeded patch files
- cleanup

* Tue Sep 30 2003 Than Ngo <than@redhat.com> 3.1.4-1
- 3.1.4

* Fri Aug 22 2003 Than Ngo <than@redhat.com> 3.1.3-2
- fix build problem with gcc 3.3

* Wed Aug 13 2003 Than Ngo <than@redhat.com> 3.1.3-1
- 3.1.3

* Wed Jun 25 2003 Than Ngo <than@redhat.com> 3.1.2-4
- rebuilt

* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Mon May 19 2003 Than Ngo <than@redhat.com> 3.1.2-2
- 3.1.2

* Fri May  2 2003 Than Ngo <than@redhat.com> 3.1.1-3
- remove unneeded patch file

* Wed Apr 30 2003 Elliot Lee <sopwith@redhat.com> 3.1.1-2
- headusage patch for ppc64

* Wed Mar 19 2003 Than Ngo <than@redhat.com> 3.1.1-1
- 3.1.1

* Fri Feb 21 2003 Than Ngo <than@redhat.com> 3.1-4
- get rid of gcc path from dependency_libs

* Wed Feb 19 2003 Elliot Lee <sopwith@redhat.com> 3.1-3
- Fix mozilla building/notbuilding to consistently use mozilla_archs macro
- Remove -O0 cflags from November

* Thu Jan 30 2003 Than Ngo <than@redhat.com> 3.1-2
- lib64'ize
- add fix to build kmozilla binding
- add correct python version

* Tue Jan 28 2003 Than Ngo <than@redhat.com> 3.1-1
- 3.1 release
- cleanup specfile

* Thu Jan 23 2003 Tim Powers <timp@redhat.com> 3.1-0.6
- rebuild

* Mon Jan 13 2003 Thomas Woerner <twoerner@redhat.com> 3.1-0.4
- rc6
- ssl uses krb5

* Tue Dec  3 2002 Tim Powers <timp@redhat.com> 3.1-0.3
- lib64'ize

* Sat Nov 30 2002 Than Ngo <than@redhat.com> 3.1-0.2
- build with -O0 on ia64 x86_64 temporary
- get rid of sub packages

* Thu Nov 28 2002 Than Ngo <than@redhat.com> 3.1-0.1
- update to 3.1 rc4

* Sun Nov 10 2002 Than Ngo <than@redhat.com> 3.0.5-1
- update to 3.0.5

* Thu Nov  7 2002 Than Ngo <than@redhat.com> 3.0.4-2
- cleaned up specfile

* Tue Oct 15 2002 Than Ngo <than@redhat.com> 3.0.4-1
- 3.0.4

* Thu Sep 19 2002 Than Ngo <than@redhat.com> 3.0.3-1.1
- Added missing requires kdelibs-devel in kdebindings-devel (bug #73992)
- Fixed typo bug (bug #51669)
- Added Buildprereq arts-devel instead kdelibs-sound
- Fixed to build on s390/s390x/x86_64

* Mon Aug 12 2002 Than Ngo <than@redhat.com> 3.0.3-1
- 3.0.3
- build using gcc-3.2-0.3

* Mon Jul 22 2002 Tim Powers <timp@redhat.com> 3.0.2-3
- rebuild using gcc-3.2-0.1

* Fri Jul 12 2002 Than Ngo <than@redhat.com> 3.0.2-2
- 3.0.2

* Fri Jun 14 2002 Bernhard Rosenkraenzer <bero@redhat.com> 3.0.2-0.cvs20020614
- Update to current stable branch to make it work with Qt 3.0.4
- Enable building Java bindings (with jdkgcj)

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Wed Mar 27 2002 Bernhard Rosenkraenzer <bero@redhat.com> 3.0.0-1
- 3.0.0 final
- Disable building C, Java and Objective-C bindings for now, they require
  a real C++ compiler rather than a something-between-C-and-C++-compiler

* Mon Feb 18 2002 Bernhard Rosenkraenzer <bero@redhat.com> 3.0.0-0.cvs20020218.1
- Update
- Another try at getting the Qt Java bindings to build and actually work with
  gcj.

* Thu Jan 31 2002 Tim Powers <timp@redhat.com>
- rebuilt to solve deps on kdelibs
- don't build kmozilla package for ia64

* Wed Jan 30 2002 Bernhard Rosenkraenzer <bero@redhat.com> 3.0.0-0.cvs20020130.1
- Update
- Get the qt java bindings to build with gcj
- Temporarily disable building KDE-C, KDE-Java, DCOP-perl and DCOP-python
  bindings; they don't compile.

* 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