File gtk-sharp2.spec of Package gtk-sharp2
# We need to fix _libexec dir to ${prefix}/lib even on 64bit archs. (pruiz)
# See: http://fedoraproject.org/wiki/User:Chkr/MonoMultiarchChanges
%define _libexecdir %{_prefix}/lib
Name: gtk-sharp2
Version: 2.12.45
Release: 0
Summary: GTK+ and GNOME bindings for Mono
Group: System Environment/Libraries
License: LGPL
URL: http://gtk-sharp.sf.net
Source0: gtk-sharp-%{version}.tar.gz
# bug437293
%ifarch ppc64
Obsoletes: gtk-sharp2-64bit
%endif
%ifarch %ix86 ppc
Obsoletes: gtk-sharp2-32bit
%endif
BuildRequires: automake, libtool
BuildRequires: libglade2-devel
BuildRequires: libtool
BuildRequires: mono-devel >= 5.0.1.1
%if 0%{?fedora} || 0%{?rhel} || 0%{?centos}
BuildRequires: pkgconfig
BuildRequires: librsvg2-devel
%else
BuildRequires: pkg-config
BuildRequires: librsvg-devel
BuildRequires: update-desktop-files
%endif
%if 0%{?centos} < 900
#BuildRequires: vte-devel
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Mono only available on these:
ExclusiveArch: %ix86 x86_64 ppc ia64 aarch64 armv4l sparc alpha
# no mono on s390 for now: s390 s390x
%description
This package provides a library that allows you to build
fully native graphical GNOME applications using Mono. Gtk#
is a binding to GTK+, the cross platform user interface
toolkit used in GNOME. It includes bindings for Gtk, Atk,
Pango, Gdk.
%package gapi
Group: Development/Languages
Summary: Glib and GObject C source parser and C generator for the creation and maintenance of managed bindings for Mono and .NET
Requires: perl-XML-LibXML-Common perl-XML-LibXML perl-XML-SAX
%description gapi
This package provides developer tools for the creation and
maintainance of managed bindings to native libraries which utilize
glib and GObject. Some examples of libraries currently bound using
the GAPI tools and found in Gtk# include Gtk, Atk, Pango, Gdk.
%package devel
Summary: files needed for developing with gtk-sharp2
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
%description devel
This package provides the necessary development libraries and headers
for writing gtk-sharp2 applications.
%package doc
Group: Documentation
Summary: Gtk# documentation
Requires: %{name} = %{version}-%{release}
%description doc
This package provides the Gtk# documentation for monodoc.
%package -n gtk-sharp2-complete
Summary: GTK+ and GNOME bindings for Mono (virtual package)
License: LGPL-2.1
Group: System/GUI/GNOME
Requires: glade-sharp2 = %{version}-%{release}
Requires: glib-sharp2 = %{version}-%{release}
Requires: gtk-sharp2 = %{version}-%{release}
Requires: gtk-sharp2-doc = %{version}-%{release}
Requires: gtk-sharp2-gapi = %{version}-%{release}
%description -n gtk-sharp2-complete
Gtk# is a library that allows you to build fully native graphical GNOME
applications using Mono. Gtk# is a binding to GTK+, the cross platform
user interface toolkit used in GNOME. It includes bindings for Gtk,
Atk, Pango, Gdk, libgnome, libgnomeui and libgnomecanvas. (Virtual
package which depends on all gtk-sharp2 subpackages)
%prep
%setup -n gtk-sharp-%{version}
rpm --showrc
%build
autoreconf -fiv
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export MONO_SHARED_DIR=%{_builddir}/%{?buildsubdir}
## Avoid configure problems due to BuildArch == noarch.
%global _saved_target_cpu %{_target_cpu}
%define _target_cpu %{_build_cpu}
%configure --enable-debug
%undefine _target_cpu
%define _target_cpu %{_saved_target_cpu}
sed -i'' -e 's,^using Gtk;,using Gtk;\nusing Range = Gtk.Range;,g' sample/test/TestRange.cs
make
%install
%{__rm} -rf $RPM_BUILD_ROOT
export MONO_SHARED_DIR=%{_builddir}/%{?buildsubdir}
make install DESTDIR=$RPM_BUILD_ROOT GACUTIL_FLAGS="/package gtk-sharp-2.0 /gacdir %{_libexecdir} /root ${RPM_BUILD_ROOT}%{_libexecdir}"
%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.*a
install -d $RPM_BUILD_ROOT%{_libexecdir}/monodoc/sources/
install -m 755 doc/gtk-sharp-docs.source $RPM_BUILD_ROOT%{_libexecdir}/monodoc/sources/
cp -R doc/en $RPM_BUILD_ROOT%{_libexecdir}/monodoc/sources/gtk-sharp-docs
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog README
%{_libdir}/*.so
%dir %{_libexecdir}/gtk-sharp-2.0
%{_libexecdir}/mono/gac
%{_libexecdir}/mono/gtk-sharp-2.0
%files gapi
%defattr(-,root,root,-)
%{_bindir}/gapi2-codegen
%{_bindir}/gapi2-fixup
%{_bindir}/gapi2-parser
%{_libexecdir}/gtk-sharp-2.0/gapi_codegen.exe
%{_libexecdir}/gtk-sharp-2.0/gapi-fixup.exe
%{_libexecdir}/gtk-sharp-2.0/gapi-parser.exe
%{_libexecdir}/gtk-sharp-2.0/gapi_pp.pl
%{_libexecdir}/gtk-sharp-2.0/gapi2xml.pl
%{_datadir}/gapi-2.0
%{_libdir}/pkgconfig/gapi-2.0.pc
%files devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/*-sharp-2.0.pc
%{_libdir}/pkgconfig/gtk-dotnet-2.0.pc
%files doc
%defattr(-,root,root,-)
%{_libexecdir}/monodoc
%files -n gtk-sharp2-complete
%defattr(-, root, root)
%dir %{_prefix}/lib/mono/gtk-sharp-2.0
%dir %{_prefix}/lib/gtk-sharp-2.0
%changelog