LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File qtsharp.spec of Package qtsharp (Project openSUSE:Factory)

# 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/

Name:           qtsharp
BuildRequires:  libicu libjpeg-devel mono-basic mono-data-sqlite mono-devel qt3-devel qtc update-desktop-files
License:        LGPL-2.1+
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

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

%setup -q -n %name -a 1

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

%if %mono_build
make CSC=mcs CLI=mono   INSTALL_ROOT=$RPM_BUILD_ROOT/ install
make CSC=cscc CLI=ilrun INSTALL_ROOT=$RPM_BUILD_ROOT/ install
# 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/
# install susehelp file
mkdir -p $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/
install -m 0644 %SOURCE2 \
%suse_update_desktop_file $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/qtsharp.desktop

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig