%define mono_dir %(/usr/bin/monodir)
%define _name gnome-desktop-sharp
Name: gnome-desktop-sharp2
Version: 2.26.0
Release: 9%{?_dist_release}
Summary: Mono bindings for libgnome-desktop
Summary(ja): Mono 用 libgnome-desktop バインディング
Group: Development/Libraries
License: GPL, LGPL 2.0/2.1
URL: http://gtk-sharp.sf.net
#Source: http://mono.ximian.com/monobuild/preview/sources/%{mame}/%{_name}-%{version}.tar.bz2
Source: http://ftp.novell.com/pub/mono/sources/%{name}/gnome-desktop-sharp-%{version}.tar.bz2
Patch0: gnome-desktop-sharp-lib-target.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: mono-devel monodoc
BuildRequires: gnome-sharp2 gtk-sharp2-gapi
BuildRequires: librsvg2-devel libwnck-devel vte-devel
BuildRequires: gtkhtml3-devel gtksourceview2-devel
#BuildRequires: nautilus-cd-burner
BuildRequires: gnome-desktop-devel libgnomeprintui-devel
BuildRequires: gnome-panel-devel

Packager:      konno, daisuke, ryoichi

%description
This package contains Mono bindings for libgnome-desktop.

%package -n gtksourceview2-sharp
Summary: Mono bindings for gtksourceview2
Group: Development/Libraries

%description -n gtksourceview2-sharp
This package contains Mono bindings for libgtksourceview-2.0.

%package -n rsvg2-sharp
Summary: Mono bindings for rsvg
Group: Development/Libraries

%description -n rsvg2-sharp
This package contains Mono bindings for librsvg.

%package -n gtkhtml314-sharp
Summary: Mono bindings for gtkhtml
Group: Development/Libraries

%description -n gtkhtml314-sharp
This package contains Mono bindings for gtkhtml.

%package -n wnck-sharp
Summary: Mono bindings for wnck
Group: Development/Libraries

%description -n wnck-sharp
This package contains Mono bindings wnck.

%package -n vte016-sharp
Summary: Mono bindings for vte
Group: Development/Libraries

%description -n vte016-sharp
This package contains Mono bindings for vte.

#%package -n nautilusburn-sharp
#Summary: Mono bindings for nautilusburn
#Group: Development/Libraries
#
#%description -n nautilusburn-sharp
#This package contains Mono bindings for libnautilus-burn.

%package -n gnome-panel-sharp
Summary: Mono bindings for gnome-panel
Group: Development/Libraries

%description -n gnome-panel-sharp
This package contains Mono bindings for gnome-panel.

%package -n gnome-print-sharp
Summary: Mono bindings for gnome-print
Group: Development/Libraries

%description -n gnome-print-sharp
This package contains Mono bindings for gnome-print.

%prep
%setup -q -n %{_name}-%{version}
%patch0 -p1 -b .target

%build
export MONO_SHARED_DIR=%{_builddir}/%{?buildsubdir}
# FIXME: windowmanager.c:*: warning: dereferencing type-punned pointer will break strict-aliasing rules
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure --enable-debug
make


%install
rm -rf $RPM_BUILD_ROOT
export MONO_SHARED_DIR=%{_builddir}/%{?buildsubdir}
%makeinstall
rm $RPM_BUILD_ROOT%{_libdir}/*.*a


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%{mono_dir}/gnomedesktop-sharp-2.20
%{mono_dir}/gac/*gnomedesktop-sharp
%dir %{_datadir}/gnomedesktop-sharp
%{_datadir}/gnomedesktop-sharp/2.20
%{_libdir}/pkgconfig/gnome-desktop-sharp-2.0.pc

%files -n gtksourceview2-sharp
%defattr(-,root,root)
%{mono_dir}/gtksourceview2-sharp-2.0
%{mono_dir}/gac/*gtksourceview2-sharp
%dir %{_datadir}/gtksourceview2-sharp
%{_datadir}/gtksourceview2-sharp/2.0
%{_libdir}/pkgconfig/gtksourceview2-sharp.pc
%{_libdir}/libgtksourceview2sharpglue-2.so

%files -n rsvg2-sharp
%defattr(-,root,root)
%{mono_dir}/rsvg2-sharp-2.0
%{mono_dir}/gac/*rsvg2-sharp
%dir %{_datadir}/rsvg2-sharp
%{_datadir}/rsvg2-sharp/2.0
%{_libdir}/pkgconfig/rsvg2-sharp-2.0.pc

%files -n gtkhtml314-sharp
%defattr(-,root,root)
%{mono_dir}/gtkhtml-sharp-3.14
%{mono_dir}/gac/*gtkhtml-sharp
%dir %{_datadir}/gtkhtml-sharp
%{_datadir}/gtkhtml-sharp/3.14
%{_libdir}/pkgconfig/gtkhtml-sharp-3.14.pc
%{_libdir}/libgtkhtmlsharpglue-2.so

#%files -n nautilusburn-sharp
#%defattr(-,root,root)
#%{mono_dir}/nautilusburn-sharp-2.20
#%{mono_dir}/gac/*nautilusburn-sharp
#%dir %{_datadir}/nautilusburn-sharp
#%{_datadir}/nautilusburn-sharp/2.20
#%{_libdir}/pkgconfig/nautilusburn-sharp.pc
#%{_libdir}/libnautilusburnsharpglue-2.so

%files -n vte016-sharp
%defattr(-, root, root)
%{mono_dir}/vte-sharp-0.16
%{mono_dir}/gac/*vte-sharp
%dir %{_datadir}/vte-sharp
%{_datadir}/vte-sharp/0.16
%{_libdir}/libvtesharpglue-2.so
%{_libdir}/pkgconfig/vte-sharp-0.16.pc

%files -n wnck-sharp
%defattr(-, root, root)
%{mono_dir}/wnck-sharp-2.20
%{mono_dir}/gac/*wnck-sharp
%dir %{_datadir}/wnck-sharp
%{_datadir}/wnck-sharp/2.20
%{_libdir}/pkgconfig/wnck-sharp-1.0.pc
%{_libdir}/libwncksharpglue-2.so

%files -n gnome-panel-sharp
%defattr(-, root, root)
%{mono_dir}/gnome-panel-sharp-2.24
%{mono_dir}/gac/gnome-panel-sharp
%dir %{_datadir}/gnome-panel-sharp
%{_datadir}/gnome-panel-sharp/2.24
%{_libdir}/pkgconfig/gnome-panel-sharp-2.24.pc
%{_libdir}/libgnomepanelsharpglue-2.so

%files -n gnome-print-sharp
%defattr(-, root, root)
%{mono_dir}/gnome-print-sharp-2.18
%{mono_dir}/gac/gnome-print-sharp
%dir %{_datadir}/gnome-print-sharp
%{_datadir}/gnome-print-sharp/2.18
%{_libdir}/pkgconfig/gnome-print-sharp-2.18.pc

%changelog
* Tue Dec 14 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.26.0-9
- change BuildRequires: gnome-panel-devel instead of gnome-panel

* Sat Oct 09 2010 Shu KONNO <owa@bg.wakwak.com> 2.26.0-8
- rebuilt with mono-2.8

* Sun Sep 26 2010 Shu KONNO <owa@bg.wakwak.com> 2.26.0-7
- rebuilt with rpm-4.8.1 for pkg-config

* Mon May 31 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 2.26.0-6
- import Patch1 from fedora package to fix target lib number
- add BuildRequires: gnome-desktop-devel libgnomeprintui-devel
- drop BuildRequires: nautilus-cd-burner and nautilusburn-sharp
  sub package (Obsoletes by brasero)

* Thu Apr 08 2010 Shu KONNO <owa@bg.wakwak.com> 2.26.0-5
- rebuilt with new envrionment

* Wed Jul 08 2009 Shu KONNO <owa@bg.wakwak.com> 2.26.0-4
- rebuilt with latest rpm to update mono-dependencies

* Fri May 01 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.26.0-3
- BuildRequires: gtksourceview2-devel instead of gtksourceview-devel

* Fri May 01 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.26.0-2
- add sub packages gnome-panel-sharp and gnome-print-sharp
- add *glue-2.so to each sub packages
- add Packager tag

* Sat Apr 25 2009 Shu KONNO <owa@bg.wakwak.com> 2.26.0-1
- updated gnome-desktop-sharp to 2.26.0

* Sun Apr 19 2009 Shu KONNO <owa@bg.wakwak.com> 2.20.1-2
- changed url
- changed sub packages Group to Development/Libraries
- changed monodoc-core to monodoc

* Thu Sep 18 2008 Shu KONNO <owa@bg.wakwak.com> 2.20.1-1
- initial build for VineSeed
    - applied vine versioning policy
    - added japanese summary
    - spec in utf-8

* Wed Apr  9 2008 wberrier@novell.com
- Remove gnome-desktop-sharp2-complete package
- Rename gnomedesktop2-sharp to gnome-desktop-sharp2 so we have a
  sub-package named the same as the .spec file
- Don't call autoreconf since we don't have any patches
* Fri Jan 11 2008 mkestner@novell.com
- Initial package of gnome-desktop-sharp2
