%define mono_dir %(/usr/bin/monodir)
Name: monodoc-core
License: GNU General Public License (GPL)
Group: Development/Tools/Other
Summary: Monodoc--A Documentation Browser Written in C#
Summary(ja): C# で書かれたドキュメントブラウザ
URL: http://www.mono-project.com
Version: 2.0
Release: 1%{?_dist_release}
Source0: http://mono.ximian.com/monobuild/preview/sources/monodoc/monodoc-%{version}.zip
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Provides: monodoc
BuildArch: noarch
BuildRequires: mono-devel unzip
BuildRequires: mono-web

%description
Monodoc is a documentation browser for the Mono project. It is written
in C# using the GTK# libraries.

%if 0
%define __find_provides env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-provides ; } | sort | uniq'
%define __find_requires env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-requires && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-requires ; } | sort | uniq'
%endif


%prep
%setup -q -n monodoc-%{version}

%build
export MONO_SHARED_DIR=%{_builddir}/%{?buildsubdir}
./configure \
  --prefix=%{_prefix} \
  --libdir=%{_prefix}/lib \
  --libexecdir=%{_prefix}/lib \
  --localstatedir=%{_localstatedir} \
  --mandir=%{_mandir} \
  --infodir=%{_infodir} \
  --sysconfdir=%{_sysconfdir}
make

%install
%{__rm} -rf $RPM_BUILD_ROOT
export MONO_SHARED_DIR=%{_builddir}/%{?buildsubdir}
make install DESTDIR=$RPM_BUILD_ROOT

install -d $RPM_BUILD_ROOT%{_datadir}
mv $RPM_BUILD_ROOT/%{_prefix}/lib/pkgconfig $RPM_BUILD_ROOT%{_datadir}

## remove files
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/gtk-sharp-docs.tree
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources/gtk-sharp-docs.zip


%clean
rm -rf ${RPM_BUILD_ROOT}


%files
%defattr(-, root, root)
%doc AUTHORS ChangeLog NEWS README
%{_bindir}/mdassembler
%{_bindir}/mdcs2ecma
%{_bindir}/mdnormalizer
%{_bindir}/mdoc
%{_bindir}/mdoc-assemble
%{_bindir}/mdoc-export-html
%{_bindir}/mdoc-export-msxdoc
%{_bindir}/mdoc-update
%{_bindir}/mdoc-validate
%{_bindir}/mdvalidater
%{_bindir}/mod
%{_bindir}/monodocer
%{_bindir}/monodocs2html
%{_bindir}/monodocs2slashdoc
%{mono_dir}/monodoc
%{mono_dir}/gac/monodoc
%{_prefix}/lib/monodoc
%{_datadir}/pkgconfig/monodoc.pc
%{_mandir}/man1/*
%{_mandir}/man5/mdoc.5*

# Should be in mono-tools now...?
#%{_prefix}/share/applications/monodoc.desktop
#%{_prefix}/share/pixmaps/monodoc.png

%changelog
* Wed Sep 17 2008 Shu KONNO <owa@bg.wakwak.com> 2.0-1vl5
- initial build for VineSeed
	- updated monodoc to 2.0
	- applied vine versioning policy
	- added japanese summary
	- spec in utf-8

* Tue Mar 25 2008 wberrier@suse.de
- Update to 1.9
  - Documentation fixes and updates to match mono 1.9
* Mon Jan 14 2008 wberrier@suse.de
- Update to 1.2.6
  - Documentation updates to match mono 1.2.6
* Fri Aug  3 2007 wberrier@suse.de
- Update to 1.2.5
  - Documentation updates to match mono 1.2.5
  - several improvements and fixes to 'monodocer' utility
* Wed Jun  6 2007 wberrier@novell.com
- Update to 1.2.4
  - Documentation updates to match mono 1.2.4
* Fri Apr 13 2007 wberrier@novell.com
- add %%debug_package so debug packages get created
* Wed Apr 11 2007 wberrier@novell.com
- Add mono dep/req for older distros
* Thu Mar  1 2007 wberrier@suse.de
- Update to 1.2.3
  - API Documentation updates
  - Formatting fixes
  - Sub documentation for 2.0 APIs
* Sat Dec  2 2006 wberrier@suse.de
- Update to 1.2.1 (Fate #301111)
  - Sqlite Docs update
  - new manpages
  - doc generation updates and fixes
* Fri Oct 20 2006 wberrier@suse.de
- Update to 1.1.18
  - generics support and will display generic types
  - documents custom attributes with their actual constructor calls
  - monodocs2html now includes inherited members on type pages
* Wed Oct 18 2006 wberrier@suse.de
- Remove manual Requires.  mono-devel isn't needed, and all other
  deps will be generated automatically. (bnc #212972)
* Wed Aug 30 2006 wberrier@suse.de
- Update to 1.1.17
  - Updated documentation for mono 1.1.17
* Mon Jul 31 2006 wberrier@suse.de
- Update to 1.1.16
- Fixes problem with missing documentation (pathnames too long
  for a tar.gz file)
- Append the node kind to the node caption. Fixes a crash when
  editing uncompiled help sources.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 11 2006 ro@suse.de
- added mono-devel to nfb to get monoized provides
* Fri Jan  6 2006 wberrier@suse.de
- Update to 1.1.13, clean up deps
* Thu Dec 15 2005 wberrier@suse.de
- Update to 1.1.11, remove run_ldconfig
* Thu Nov 10 2005 wberrier@suse.de
- Update to 1.1.10, remove icu deps
* Fri Oct  7 2005 wberrier@suse.de
- Update to 1.1.9
* Wed Sep 28 2005 dmueller@suse.de
- add norootforbuild
* Sun Sep 25 2005 ro@suse.de
- fix file-conflict with gtk-sharp2
* Fri Aug 26 2005 wberrier@suse.de
- renmae package to monodoc-core
* Mon Aug 15 2005 ro@suse.de
- added check-build.sh
* Thu Aug 11 2005 ro@suse.de
- fix last change
* Thu Aug 11 2005 ro@suse.de
- moved pkgconfig file to /usr/share (noarch package)
* Wed Aug 10 2005 ro@suse.de
- keep monodoc script until we have a mono-tools package
* Tue Aug  9 2005 gekker@suse.de
- Update to version 1.0.7
- Remove upstreamed patches
* Mon Jul 18 2005 dkukawka@suse.de
- changed package to noarch
* Tue Feb 22 2005 ro@suse.de
- fix build on x86_64
* Mon Feb 21 2005 clahey@suse.de
- Update to 1.0.6.
* Sun Feb  6 2005 ro@suse.de
- adapt pc-file
* Thu Jan 20 2005 ro@suse.de
- fix build on lib64
* Fri Dec  3 2004 dkukawka@suse.de
- fix libexecdir, now all {libdir}/monodoc files now at /usr/lib
  instead of /usr/lib64 (with symlink)
* Fri Dec  3 2004 ro@suse.de
- removed wrong re-definitions of find_{requires,provides}
* Tue Nov 30 2004 dkukawka@suse.de
- init
