Blob Blame History Raw
%define build_release 0
%define build_beta 1
%define build_snapshot 2

%define isClean 1

%define isBuild %{build_release}

%define debug 0

%define release_number 1

%define build_for_ftp 0

%define strip_bin 0
%define final 0
%define rpm_clean 1

%define desktop_file 1
%define desktop_file_utils_version 0.2.93

%define support_arch "%{ix86} alpha ia64 ppc"

%define qt_version 3.0.5

%define perl 0
%define python 0

%define libtool 1

Version: 3.0.5a
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}-root

%if "%{isBuild}" == "%{build_release}"
%define release_name %{nil}
Release: %{release_number}
Source: ftp://ftp.kde.org/pub/kde/stable/%{version}/distribution/tar/generic/source/%{name}-%{version}.tar.bz2
%endif

%if "%{isBuild}" == "%{build_beta}"
%define release_name beta1
Release: 0.%{release_name}.%{release_number}
Source: ftp://ftp.kde.org/pub/kde/stable/%{version}/distribution/tar/generic/source/%{name}-%{release_name}.tar.bz2
%endif

%if "%{isBuild}" == "%{build_snapshot}"
%define release_name 20020807
Release: 0.%{release_name}cvs.%{release_number}
Source: cvs://cvs.kde.org/%{name}-%{release_name}.tar.bz2
%endif

%if %{build_for_ftp}
ExclusiveArch: %{ix86}
%endif

Patch0: kdebindings-3.0.0-gcjjava.patch
Patch1: kdebindings-3.0.0-qtjava-package.patch
Patch2: kdebindings-automake.patch
Patch3: kdebindings-3.0.2-broken.patch
Patch4: kdebindings-3.0.2-mozilla.patch

BuildRequires: zlib-devel
BuildRequires: kdelibs-devel >= 3.0.3
BuildRequires: arts-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: automake15

Requires: kdelibs >= %{version}
Requires: kdebase >= %{version}

Prereq: /sbin/ldconfig

%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 >= %{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 %{ix86} ppc alpha
%package kmozilla
Summary: KDE bindings to mozilla
Group: User Interface/Desktops
Requires: mozilla
Requires: kdebase >= %{version}


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

%package perl
Summary: Perl bindings to DCOP
Group: Development/Libraries
Requires: kdelibs >= %{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 >= %{version}
Requires: python >= 2.2

%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 >= %{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 >= %{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 >= %{version}
Requires: kdebindings-qtjava = %{version}-%{release}
Requires: libgcj

%description kdejava
Java bindings to KDE
%endif

%prep
rm -rf $RPM_BUILD_ROOT

%if "%{isBuild}" == "%{build_release}"
%setup -q
%else
%setup -q -n %{name}-%{version}-%{release_name}
%endif

%patch -p1 -b .gcj
%patch1 -p1 -b .package
%patch2 -p1 -b .automake
%patch3 -p1 -b .broken
%patch4 -p1 -b .mozilla

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

# Workaround for legacy auto* tools
%if %{libtool}
[ -x /usr/bin/autoconf-2.5? ] && ln -s /usr/bin/autoconf-2.5? autoconf
[ -x /usr/bin/autoheader-2.5? ] && ln -s /usr/bin/autoheader-2.5? autoheader
[ -x /usr/bin/aclocal-1.5 ] && ln -s /usr/bin/aclocal-1.5 aclocal
[ -x /usr/bin/automake-1.5 ] && ln -s /usr/bin/automake-1.5 automake
export PATH=`pwd`:$PATH
make -f admin/Makefile.common cvs
%endif

export CFLAGS="$RPM_OPT_FLAGS -fno-use-cxa-atexit"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-use-cxa-atexit"

%configure \
   --includedir=%{_includedir}/kde \
%ifarch %{support_arch}
   --with-java=%{prefix}
%else
   --without-java
%endif

make %{?smp_mflags}

%if %{perl}
cd dcopperl
perl Makefile.PL <<EOF
$QTDIR/include
$QTDIR/lib
%{_includedir}/kde
%{_libdir}
EOF
make
%endif

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR="$RPM_BUILD_ROOT"

%if %{perl}
make -C dcopperl install PREFIX="$RPM_BUILD_ROOT%{_prefix}"
%endif

if [ -d "$RPM_BUILD_ROOT%{_prefix}/doc" ]; then
   mkdir -p $RPM_BUILD_ROOT%{_docdir}
   mv -f $RPM_BUILD_ROOT%{_prefix}/doc/* $RPM_BUILD_ROOT%{_docdir}
   rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
fi

%clean
rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_libdir}/libdcopc.so.*
%{_libdir}/lib*xparts.so.*
%{_libdir}/*xp_note*
%{_datadir}/services/xp_notepad.desktop
%{_bindir}/xp_notepad
%{_bindir}/shell_xparthost

%if %{python}
%files python
%defattr(-,root,root)
%{_libdir}/python*/*/*
%endif

%ifarch %{support_arch}
%files qtjava
%defattr(-,root,root)
%{_libdir}/libqtjava*
%{_includedir}/kde/qtjava
%{_libdir}/java
%doc %{_docdir}/javalib
%endif

%files qtc
%defattr(-,root,root)
%{_libdir}/libqtc.*

%ifarch %{support_arch}
%files kdejava
%defattr(-,root,root)
%{_libdir}/libkdejava*
%{_includedir}/kde/kdejava
%endif

%files kdec
%defattr(-,root,root)
%{_libdir}/libkdec*

%files devel
%defattr(-,root,root)
%{_libdir}/libdcopc.??
%{_libdir}/lib*xparts.??
%{_includedir}/kde/xkparts
%{_includedir}/dcopc

%ifarch %{ix86} ppc alpha
%files kmozilla
%defattr(-,root,root)
%{_bindir}/kmozilla
%{_libdir}/*mozilla*
%{_datadir}/services/kmozilla.desktop
%endif

%if %{perl}
%files perl
%defattr(-,root,root)
%{_libdir}/perl5/site_perl/*/*/auto/DCOP/*
%{_libdir}/perl5/site_perl/*/*/DCOP.pm
%{_libdir}/perl5/site_perl/*/*/DCOP/Object.pm
%{_mandir}/man3/DCOP.3pm*
%endif

%changelog
* Sun Dec 22 2002 Than Ngo <than@redhat.com> 3.0.5a-1
- update to 3.0.5a

* 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