File qtsharp.spec of Package qtsharp

#
# spec file for package qtsharp (Version 0.7.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           qtsharp
BuildRequires:  libdrm-devel libicu libjpeg-devel mono-basic mono-data-sqlite mono-devel qt3-devel qtc update-desktop-files
License:        LGPL v2.1 or later
Group:          Development/Libraries/Other
Summary:        Qt Bindings for C#
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://qtcsharp.sourceforge.net/
Version:        0.7.1
Release:        236
Provides:       kdebindings3-Csharp
Obsoletes:      kdebindings3-Csharp
Source:         %name-%version.tar.bz2
Source1:        qtsharp-0.6-API-docs.tar.bz2
Source2:        qtsharp.desktop
Patch:          %name.diff
%define mono_build 1

%description
This package contains Qt C# bindings, which can be used with the Mono
or pnet compiler.



Authors:
--------
    The KDE Team <kde@kde.org>

%prep
%setup -q -n %name -a 1
%patch

%build
export PATH=/usr/lib/qt3/bin:$PATH
export QTDIR=/usr/lib/qt3
qmake INSTALLDIR=%_libdir
%if %mono_build
make CSC=mcs CLI=mono
%else
make CSC=cscc CLI=ilrun
%endif

%install
%if %mono_build
make CSC=mcs CLI=mono   INSTALL_ROOT=$RPM_BUILD_ROOT/ install
%else
make CSC=cscc CLI=ilrun INSTALL_ROOT=$RPM_BUILD_ROOT/ install
%endif
# installing libqtsharp is failing
cp -av src/libqtsharp/libqtsharp.so* $RPM_BUILD_ROOT/%_libdir
# C# is plattform independend
if [ %_lib != "lib" ]; then
  mkdir -p $RPM_BUILD_ROOT/usr/lib
  mv $RPM_BUILD_ROOT/usr/%_lib/Qt.dll $RPM_BUILD_ROOT/usr/lib/
fi 
# install susehelp file
mkdir -p $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/
install -m 0644 %SOURCE2 \
        $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/
%suse_update_desktop_file $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/qtsharp.desktop

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS README NEWS TODO COPYING ChangeLog apidocs
/usr/lib/Qt.dll
%_libdir/libqtsharp*
/usr/share/susehelp

%changelog
* Mon Feb 25 2008 crrodriguez@suse.de
- fix library-without-ldconfig-postin errors
* Sun Jan 29 2006 aj@suse.de
- Fix build.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 10 2005 adrian@suse.de
- fix build, Qt tools aren't in default PATH anymore
* Mon Nov 29 2004 adrian@suse.de
- use mono instead of pnet by default
- install a susehelp desktop file for API docu
* Thu Nov 11 2004 coolo@suse.de
- fixing file list for debug packages
* Mon Sep 06 2004 adrian@suse.de
- initial package of version 0.7.1
  (C# bindings in kdebindings is not working atm)
openSUSE Build Service is sponsored by