File mingw64-gtk-sharp2.spec of Package mingw64-gtk-sharp2

#
# spec file for package mingw64-gtk-sharp2
#
# Copyright (c) 2014 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:           mingw64-gtk-sharp2
Version:        2.12.26
Release:        0
Summary:        Gtk#
License:        LGPL-2.1-only
Group:          Development/Languages/Mono
Url:            http://www.mono-project.com
Source:         gtk-sharp-%{version}.tar.bz2
Patch0:         gtk-sharp-2.12.26-canonicalhost.patch
Patch1:         gtk-sharp-2.12-disable-samples.patch
#!BuildIgnore: post-build-checks
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  mingw64-cairo-devel
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-filesystem
BuildRequires:  mingw64-gtk2-devel
BuildRequires:  mingw64-pango-devel
BuildRequires:  mono-devel
%_mingw64_package_header_debug
BuildArch:      noarch

%description
Gtk# is a binding of Gtk+ for Mono/.NET.

%_mingw64_debug_package

%package gapi-tools
Summary:        Gtk# (development tools)
Group:          Development/Libraries

%description gapi-tools
Gtk# is a binding of Gtk+ for Mono/.NET.
This package contains the gapi utilities for generating .Net bindings of GLib based API.

%prep
%setup -q -n gtk-sharp-%{version}
%patch -P 0 -p1
%patch -P 1 -p1

%build
autoreconf -f -i
export PATH="%{_mingw64_bindir}:$PATH"
export MONO_PATH="`pwd`/atk:`pwd`/cairo:`pwd`/gdk:`pwd`/glib:`pwd`/gtk:`pwd`/pango:$MONO_PATH"
echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw64_cache}
# Adjust the PKG_CONFIG_PATH so non-mingw mono can be found/used
%{_mingw64_configure} \
	PKG_CONFIG_PATH=%{_mingw64_libdir}/pkgconfig:%{_mingw64_datadir}/pkgconfig:%{_datadir}/pkgconfig:%{_libdir}/pkgconfig \
	--enable-shared --disable-static
make %{?_smp_mflags} || make

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}

# Move and rename glue files
pushd %{buildroot}%{_mingw64_libdir}/ && for lib in *glue*.dll; do mv $lib %{buildroot}%{_mingw64_bindir}/${lib:3}; done && popd
rm -rf %{buildroot}%{_mingw64_libdir}/*.dll.a

%files
%defattr(-,root,root)
%{_mingw64_bindir}/atksharpglue-2.dll
%{_mingw64_bindir}/gdksharpglue-2.dll
%{_mingw64_bindir}/glibsharpglue-2.dll
%{_mingw64_bindir}/gtksharpglue-2.dll
%{_mingw64_bindir}/pangosharpglue-2.dll
%{_mingw64_libdir}/mono/gac/
%{_mingw64_libdir}/mono/gtk-sharp-2.0/
%{_mingw64_libdir}/pkgconfig/*.pc

%files gapi-tools
%defattr(-,root,root)
%{_mingw64_bindir}/gapi2-codegen
%{_mingw64_bindir}/gapi2-fixup
%{_mingw64_bindir}/gapi2-parser
%{_mingw64_datadir}/gapi-2.0/*.xml
%{_mingw64_libdir}/gtk-sharp-2.0/

%changelog
openSUSE Build Service is sponsored by