%define bootstrap 1

Name:           mono
Version:        3.12.1
Release:        1%{?_dist_release}
Summary:        A .NET runtime environment
Summary(ja):	.NET ランタイム環境

Group:          Development/Languages
License:        LGPLv2.1 and MIT and MS-PL
URL:            http://www.mono-project.com/

Source0:        http://download.mono-project.com/sources/mono/mono-%{version}.tar.bz2
#Source1: monodir.c

Patch0:		0001-Workaround-for-X509Certificate.RSA-throwing-an-unhan.patch

BuildRoot: 	%{_tmppath}/%{name}-%{version}-root
BuildRequires:  bison
BuildRequires:  gettext-devel
BuildRequires:  glib2-devel
BuildRequires:  pkgconfig
BuildRequires:  libicu-devel
BuildRequires:  libgdiplus-devel >= 2.10
BuildRequires:  libX11-devel
BuildRequires:  valgrind-devel
BuildRequires:  zlib-devel

# Yes, mono actually depends on itself, because
# we deleted the bootstrapping binaries. If you
# need to bootstrap mono, comment out this BuildRequires
# and don't delete the binaries in %%prep.
%if !%{bootstrap}
BuildRequires:	mono-core
%endif
			  
# JIT only availible on these:
ExclusiveArch: %{ix86} x86_64 %{arm} sparcv9 alpha s390x ppc ppc64

Distribution:	Vine Linux
Vendor: 	Project Vine
Packager: 	owa

%description
The Mono runtime implements a JIT engine for the ECMA CLI
virtual machine (as well as a byte code interpreter, the
class loader, the garbage collector, threading system and
metadata access libraries.

%description -l ja
Mono ランタイムは ECMA CLI 仮想機械用 JIT エンジンの実装です。バイト
コードインタプリタ、クラスローダ、ガベージコレクタ、スレッドシステム
およびメタデータアクセスライブラリの機能を持ちます。

%package core
Summary: 	The Mono CIL runtime, suitable for running .NET code
Summary(ja): 	.NET コードの実行に適した Mono CIL ランタイム
License:        LGPLv2.1 and MIT and MS-PL
Group: 		Development/Languages
Requires: 	libgdiplus

%description core
This package contains the core of the Mono runtime including its
Virtual Machine, Just-in-time compiler, C# compiler, security
tools and libraries (corlib, XML, System.Security, ZipLib,
I18N, Cairo and Mono.*).

%description -l ja core
このパッケージには、仮想マシン、Just-In-Time コンパイラ、C# コンパイラ、セキュリティツール及びライブラリ (corlib, XML, System.Security, ZipLib, I18N, Cairo and Mono.*) を含む Mono ランタイムが含まれています。

%package devel
Summary:        Development tools for Mono
Summary(ja):    Mono 開発ツール
License:        LGPLv2
Group:          Development/Tools
Requires:       mono-core = %{version}-%{release}
# Required because they are referenced by .pc files
Requires:       mono-data = %{version}
Requires:       mono-extras = %{version}
Requires:       mono-web = %{version}
Requires:       mono-winforms = %{version}
Requires:       libgdiplus-devel
Requires:       pkgconfig

%description devel
This package completes the Mono developer toolchain with the mono profiler,
assembler and other various tools.

%package nunit
Summary:        NUnit Testing Framework
Summary(ja):    NUnit テストフレームワーク
License:        LGPLv2
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}
Provides:	mono-nunit-devel = %{version}-%{release}

%description nunit
NUnit is a unit-testing framework for all .NET languages. Initially
ported from JUnit, the current release, version 2.2, is the fourth
major release of this Unit based unit testing tool for Microsoft .NET.
It is written entirely in C# and  has been completely redesigned to
take advantage of many .NET language features, for example
custom attributes and other reflection related capabilities. NUnit
brings xUnit to all .NET languages.

%package locale-extras
Summary:        Extra locale information for Mono
Summary(ja):    Mono 用追加ロケール情報
License:        LGPLv2
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}

%description locale-extras
This package contains assemblies to support I18N applications for non-latin alphabets.

%package extras
Summary:        Provides the infrastructure for running and building daemons and services with Mono as well as various stub assemblies
License:        LGPLv2
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}

%description extras
This package provides the libary and application to run services
and daemons with Mono. It also includes stubs for the following
.NET 1.1 and 2.0 assemblies: Microsoft.Vsa,
System.Configuration.Install, System.Management, System.Messaging.

%package winforms
Summary:        Windows Forms implementation for Mono
Summary(ja):    Windows フォームの Mono による実装
License:        LGPLv2
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}

%description winforms
This package provides a fully managed implementation of
System.Windows.Forms, the default graphical toolkit for .NET
applications.

%package wcf
Summary:        Mono implementation of Windows Communication Foundation
Summary(ja):    Windows Communication Foundation の Mono による実装
License:        MIT and MS-PL
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}
Provides:	mono-wcf-devel = %{version}-%{release}

%description wcf
This package provides an implementation of WCF, the Windows Communication
Foundation.

%package winfx
Summary:        Mono implementation of core WinFX APIs
Summary(ja):    コア WinFX API の Mono による実装
License:        MIT and MS-PL
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}

%description winfx
Open source implementation of core WinFX APIs

%package web
Summary:        ASP.NET, Remoting, and Web Services for Mono
Summary(ja):    Mono 用の ASP.NET, リモート，Web サービス
License:        MIT and MS-PL
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}

%description web
This package provides the ASP.NET libraries and runtime for
development of web application, web services and remoting support.

%package mvc
Summary:        Mono implementation of ASP.NET MVC
Summary(ja):    ASP.NET MVC の Mono による実装
License:        MIT and MS-PL
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}
Provides:	mono-mvc-devel = %{version}-%{release}

%description mvc
This is the Mono implementation of ASP.NET MVC

%package entityframework
Summary:        Entity Framework (EF) is an object-relational mapper
License:        Apache
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}

%description entityframework
Entity Framework (EF) is an object-relational mapper that enables .NET
developers to work with relational data using domain-specific objects.
It eliminates the need for most of the data-access code that developers
usually need to write

%package reactive
Summary:        Reactive Extensions
License:        Apache
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}
Provides:	mono-reactive-devel = %{version}-%{release}

%description reactive
This is the Mono implementation of Microsoft's Reactive Extensions.

#'

%package data
Summary:        Database connectivity for Mono
License:        LGPLv2
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}

%description data
This package provides a Mono assembly to facilitate data access
and manipulation with databases, LDAP compatible directory servers
and/or XML data exchange. Beyond the ADO.NET, Novell.LDAP and
System.DirectoryServices assemblies, it also includes a command
line sql application as well as the Microsoft SQL Server and ODBC
data providers.

%package data-sqlite
Summary:        sqlite database connectivity for Mono
License:        LGPLv2
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}
Requires:       mono-data = %{version}-%{release}

%description data-sqlite
This package contains the ADO.NET Data provider for the sqlite
database.

%package data-oracle
Summary:        Oracle database connectivity for Mono
License:        LGPLv2
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}
Requires:       mono-data = %{version}-%{release}

%description data-oracle
This package contains the ADO.NET Data provider for the Oracle
database.

%package data-postgresql
Summary:        Postgresql database connectivity for Mono
License:        LGPLv2
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}
Requires:       mono-data = %{version}-%{release}

%description data-postgresql
This package contains the ADO.NET Data provider for the PostgreSQL
database.

%package -n ibm-data-db2
Summary:        IBM DB2 database connectivity for Mono
License:        LGPLv2
Group:          Development/Languages
Requires:       mono-core = %{version}-%{release}
Requires:       mono-data = %{version}-%{release}

%description -n ibm-data-db2
This package contains the ADO.NET Data provider for the IBM DB2
Universal database.

%package -n monodoc
Summary:	The Mono documentation system
Summary(ja):	Mono ドキュメントシステム
License:        LGPLv2
Group:		Development/Tools
Requires:	mono-core = %{version}-%{release}
# Added to uncompress and compare documentation used by build-compare
Requires:       unzip
Provides:       monodoc-devel = %{version}-%{release}
Obsoletes:  	monodoc-core <= 2.0-1vl5

%description -n monodoc
monodoc is the documentation package for the mono .NET environment


## macros
%define mono_dir %{_prefix}/lib/mono
%define mono_doc %{_prefix}/lib/monodoc
%define gac_dll(dll) %{mono_dir}/gac/%{1} \
	%{mono_dir}/?.?/%{1}.dll \
	%{nil}
%define mono_bin(bin) %{_bindir}/%{1} \
	%{mono_dir}/?.?/%{1}.exe \
	%{mono_dir}/?.?/%{1}.exe.* \
	%{nil}

%prep
%setup -q -n mono-%{version}
%patch0 -p1

%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"

%configure \
    --with-ikvm-native=yes \
    --with-jit=yes \
    --with-xen_opt=yes \
    --with-sgen=no \
%ifnarch %ix86 x86_64
    --disable-system-aot \
%endif
%ifarch ppc
    --with-mcs-docs=no \
    --with-sigaltstack=no \
%endif
    --with-moonlight=no \
    --with-monotouch=no \
    --with-libgdiplus=installed
		   
make %{?_smp_mflags}


%install
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && %{__rm} -rf %{buildroot}
make install DESTDIR=%{buildroot}

## Remove unused files
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_libdir}/*.a

# We put these inside rpm
rm -f %{buildroot}%{_bindir}/mono-find-provides
rm -f %{buildroot}%{_bindir}/mono-find-requires

# This was removed upstream:
rm -rf %{buildroot}%{mono_dir}/*/Mono.Security.Win32*
rm -f %{buildroot}%{_libdir}/libMonoSupportW.*
rm %{buildroot}%{_datadir}/libgc-mono/README*
rm %{buildroot}%{_datadir}/libgc-mono/barrett_diagram
rm %{buildroot}%{_datadir}/libgc-mono/*.html
rm %{buildroot}%{_datadir}/libgc-mono/gc.man
rm -f %{buildroot}%{mono_dir}/2.0/mscorlib.dll.so
rm -f %{buildroot}%{mono_dir}/2.0/mcs.exe.so
rm -f %{buildroot}%{mono_dir}/2.0/gmcs.exe.so
rm -rf %{buildroot}%{mono_dir}/xbuild/Microsoft
rm -f %{buildroot}%{mono_dir}/4.0/mscorlib.dll.so
rm -f %{buildroot}%{mono_dir}/4.5/mscorlib.dll.so
#rm -rf %{buildroot}%{_bindir}/mono-configuration-crypto
#rm -rf %{buildroot}%{_mandir}/man?/mono-configuration-crypto*

# remove stuff that we don't package
rm -f %{buildroot}%{_bindir}/cilc
rm -f %{buildroot}%{_mandir}/man1/cilc.1*
rm -f %{buildroot}%{_prefix}/lib/mono/*/browsercaps-updater.exe*
rm -f %{buildroot}%{_prefix}/lib/mono/*/culevel.exe*
rm -f %{buildroot}%{_prefix}/lib/mono/2.0/cilc.exe*

# Fix non-executable-in-bin
chmod +x %{buildroot}%{_bindir}/mono-gdb.py
rm -f %{buildroot}%{_bindir}/mono-sgen-gdb.py

#ERROR: link target doesn't exist (neither in build root nor in installed system):
rm -rf %{buildroot}%{_prefix}/lib/mono/xbuild/12.0/bin/Microsoft.Build.dll
rm -rf %{buildroot}%{_prefix}/lib/mono/xbuild/12.0/bin/Microsoft.Build.Engine.dll
rm -rf %{buildroot}%{_prefix}/lib/mono/xbuild/12.0/bin/Mono.XBuild.Tasks.dll
rm -rf %{buildroot}%{_prefix}/lib/mono/xbuild/12.0/bin/Microsoft.Build.Framework.dll
rm -rf %{buildroot}%{_prefix}/lib/mono/xbuild/12.0/bin/Microsoft.Build.Tasks.v12.0.dll
rm -rf %{buildroot}%{_prefix}/lib/mono/xbuild/12.0/bin/Microsoft.Build.Utilities.v12.0.dll

%find_lang mcs


%clean
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && %{__rm} -rf %{buildroot}

%post core -p /sbin/ldconfig
%postun core -p /sbin/ldconfig

%files core -f mcs.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING.LIB LICENSE ChangeLog NEWS README.md
%dir %{mono_dir}
%dir %{mono_dir}/2.0
%dir %{mono_dir}/3.5
%dir %{mono_dir}/4.0
%dir %{mono_dir}/4.5
%dir %{mono_dir}/4.5/Facades
%dir %{mono_dir}/compat-2.0
%dir %{mono_dir}/gac
%dir %{_sysconfdir}/mono
%dir %{_sysconfdir}/mono/2.0
%dir %{_sysconfdir}/mono/4.0
%dir %{_sysconfdir}/mono/4.5
%config %{_sysconfdir}/mono/2.0/machine.config
%config %{_sysconfdir}/mono/2.0/settings.map
%config %{_sysconfdir}/mono/4.0/machine.config
%config %{_sysconfdir}/mono/4.0/settings.map
%config %{_sysconfdir}/mono/4.5/machine.config
%config %{_sysconfdir}/mono/4.5/settings.map
%config %{_sysconfdir}/mono/config

%mono_bin al
%{_bindir}/al2
%mono_bin certmgr
%mono_bin chktrust
%mono_bin crlupdate
%mono_bin csharp
%{_bindir}/dmcs
%mono_bin gacutil
%{_bindir}/gacutil2
%{_bindir}/gmcs
%mono_bin ikdasm
%mono_bin mcs
%{_bindir}/mono
%{_bindir}/mono-boehm
%{_bindir}/mono-configuration-crypto
%{_bindir}/mono-test-install
%mono_bin mozroots
%{_bindir}/peverify
%mono_bin setreg
%mono_bin sn

%{_mandir}/man1/al.1.gz
%{_mandir}/man1/certmgr.1.gz
%{_mandir}/man1/chktrust.1.gz
%{_mandir}/man1/crlupdate.1.gz
%{_mandir}/man1/csharp.1.gz
%{_mandir}/man1/gacutil.1.gz
%{_mandir}/man1/mcs.1.gz
%{_mandir}/man1/mono.1.gz
%{_mandir}/man1/mono-configuration-crypto.1.gz
%{_mandir}/man1/mozroots.1.gz
%{_mandir}/man1/setreg.1.gz
%{_mandir}/man1/sn.1.gz
%{_mandir}/man5/mono-config.5.gz

%{_libdir}/libMonoPosixHelper.so
%{_libdir}/libikvm-native.so
%{_libdir}/libmono*-2.0.so.*
%{_libdir}/libmono-profiler-*.so.*

%gac_dll Commons.Xml.Relaxng
%gac_dll CustomMarshalers
%gac_dll I18N
%gac_dll I18N.CJK
%gac_dll I18N.West
%gac_dll ICSharpCode.SharpZipLib
%gac_dll Microsoft.CSharp
%gac_dll Microsoft.VisualC
%gac_dll Mono.C5
%gac_dll Mono.CSharp
%gac_dll Mono.Cairo
%gac_dll Mono.CompilerServices.SymbolWriter
%gac_dll Mono.Management
%gac_dll Mono.Parallel
%gac_dll Mono.Posix
%gac_dll Mono.Security
%gac_dll Mono.Simd
%gac_dll Mono.Tasklets
%gac_dll System
%gac_dll System.Configuration
%gac_dll System.Core
%gac_dll System.Drawing
%gac_dll System.Dynamic
%gac_dll System.IO.Compression
%gac_dll System.IO.Compression.FileSystem
%gac_dll System.Json
%gac_dll System.Json.Microsoft
%gac_dll System.Net
%gac_dll System.Net.Http
%gac_dll System.Net.Http.Formatting
%gac_dll System.Net.Http.WebRequest
%gac_dll System.Numerics
%gac_dll System.Security
%gac_dll System.Threading.Tasks.Dataflow
%gac_dll System.Windows
%gac_dll System.Xml
%gac_dll System.Xml.Linq
%gac_dll System.Xml.Serialization
%gac_dll cscompmgd

%{mono_dir}/2.0/mscorlib.dll
%{mono_dir}/2.0/mscorlib.dll.mdb
%{mono_dir}/4.0/mscorlib.dll
%{mono_dir}/4.5/Facades/System*
%{mono_dir}/4.5/mscorlib.dll
%{mono_dir}/4.5/mscorlib.dll.mdb
%{mono_dir}/compat-2.0/ICSharpCode.SharpZipLib.dll
%{mono_dir}/gac/Mono.Cecil
%{mono_dir}/gac/Mono.Cecil.Mdb
%{mono_dir}/mono-configuration-crypto/4.5/mono-config*
%{mono_dir}/mono-configuration-crypto/4.5/Mono.Configuration.Crypto.dll*


%files devel
%defattr(-,root,root,-)
%mono_bin caspol
%mono_bin cccheck
%mono_bin ccrewrite
%mono_bin cert-sync
%mono_bin cert2spc
%mono_bin dtd2rng
%mono_bin dtd2xsd
%mono_bin genxs
%mono_bin httpcfg
%mono_bin ilasm
%mono_bin installvst
%mono_bin lc
%mono_bin macpack
%mono_bin makecert
%mono_bin mdbrebase
%mono_bin mkbundle
%{_bindir}/mono-api-info
%mono_bin mono-cil-strip
%{_bindir}/mono-gdb.py
%{_bindir}/mono-heapviz
%mono_bin mono-shlib-cop
%mono_bin mono-xmltool
%{_bindir}/monodis
%{_bindir}/monograph
%mono_bin monolinker
%mono_bin monop
%{_bindir}/monop2
%{_bindir}/mprof-report
%mono_bin pdb2mdb
%{_bindir}/pedump
%mono_bin permview
%{_bindir}/prj2make
%mono_bin resgen
%{_bindir}/resgen2
%mono_bin secutil
%mono_bin sgen
%mono_bin signcode
%mono_bin xbuild
%{_prefix}/lib/mono-source-libs/

%{_mandir}/man1/cccheck.1.gz
%{_mandir}/man1/ccrewrite.1.gz
%{_mandir}/man1/cert2spc.1.gz
%{_mandir}/man1/resgen.1.gz
%{_mandir}/man1/dtd2xsd.1.gz
%{_mandir}/man1/genxs.1.gz
%{_mandir}/man1/httpcfg.1.gz
%{_mandir}/man1/ilasm.1.gz
%{_mandir}/man1/lc.1.gz
%{_mandir}/man1/macpack.1.gz
%{_mandir}/man1/makecert.1.gz
%{_mandir}/man1/mkbundle.1.gz
%{_mandir}/man1/mono-api-info.1.gz
%{_mandir}/man1/mono-cil-strip.1.gz
%{_mandir}/man1/mono-shlib-cop.1.gz
%{_mandir}/man1/mono-xmltool.1.gz
%{_mandir}/man1/monodis.1.gz
%{_mandir}/man1/monolinker.1.gz
%{_mandir}/man1/monop.1.gz
%{_mandir}/man1/mprof-report.1.gz
%{_mandir}/man1/pdb2mdb.1.gz
%{_mandir}/man1/permview.1.gz
%{_mandir}/man1/prj2make.1.gz
%{_mandir}/man1/secutil.1.gz
%{_mandir}/man1/sgen.1.gz
%{_mandir}/man1/signcode.1.gz
%{_mandir}/man1/xbuild.1.gz
%{_datadir}/mono-2.0/mono/cil/cil-opcodes.xml

%gac_dll Mono.CodeContracts
%gac_dll Mono.Debugger.Soft
%gac_dll Mono.XBuild.Tasks
%gac_dll PEAPI
%gac_dll Microsoft.Build
%gac_dll Microsoft.Build.Engine
%gac_dll Microsoft.Build.Framework
%gac_dll Microsoft.Build.Tasks
%gac_dll Microsoft.Build.Utilities
%gac_dll Microsoft.Build.Tasks.v3.5
%gac_dll Microsoft.Build.Utilities.v3.5
%gac_dll Microsoft.Build.Tasks.v4.0
%gac_dll Microsoft.Build.Utilities.v4.0
%{mono_dir}/2.0/MSBuild
%{mono_dir}/2.0/Microsoft.Build.xsd
%{mono_dir}/2.0/Microsoft.*.targets
%{mono_dir}/?.0/Microsoft.Common.tasks
%{mono_dir}/3.5/MSBuild/Microsoft.Build*
%{mono_dir}/3.5/Microsoft.Build.xsd
%{mono_dir}/3.5/Microsoft.CSharp.targets
%{mono_dir}/3.5/Microsoft.Common.ta*
%{mono_dir}/3.5/Microsoft.VisualBasic.targets
%{mono_dir}/4.5/Microsoft.Build.xsd
%{mono_dir}/4.5/MSBuild/Microsoft*
%{mono_dir}/4.5/Microsoft.CSharp.targets
%{mono_dir}/4.5/Microsoft.Common.ta*
%{mono_dir}/4.5/Microsoft.VisualBasic.targets
%{mono_dir}/4.5/mono-api-info.exe
%{mono_dir}/4.5/installutil*
%{mono_dir}/4.5/ictool*
%{mono_dir}/?.?/xbuild.rsp
%{mono_dir}/gac/Microsoft.Build.Tasks.v12.0/
%{mono_dir}/gac/Microsoft.Build.Utilities.v12.0/
%{_libdir}/libmono*-2.0.so
%{_libdir}/libmono-profiler-*.so
%{_libdir}/pkgconfig/aspnetwebstack.pc
%{_libdir}/pkgconfig/cecil.pc
%{_libdir}/pkgconfig/dotnet.pc
%{_libdir}/pkgconfig/dotnet35.pc
%{_libdir}/pkgconfig/mono.pc
%{_libdir}/pkgconfig/mono-cairo.pc
%{_libdir}/pkgconfig/mono-lineeditor.pc
%{_libdir}/pkgconfig/mono-options.pc
%{_libdir}/pkgconfig/mono-2.pc
%{_libdir}/pkgconfig/xbuild12.pc
%{_includedir}/mono-2.0/mono/jit/jit.h
%{_includedir}/mono-2.0/mono/metadata/*.h
%{_includedir}/mono-2.0/mono/utils/*.h
%{_includedir}/mono-2.0/mono/cil/opcode.def
%{mono_dir}/xbuild
%{mono_dir}/xbuild-frameworks

%files nunit
%defattr(-,root,root,-)
%mono_bin nunit-console
%{_bindir}/nunit-console2
%{_bindir}/nunit-console4
%gac_dll nunit-console-runner
%gac_dll nunit.core
%gac_dll nunit.core.extensions
%gac_dll nunit.core.interfaces
%gac_dll nunit.framework
%gac_dll nunit.framework.extensions
%gac_dll nunit.mocks
%gac_dll nunit.util
# devel 
%{_libdir}/pkgconfig/mono-nunit.pc

%files locale-extras
%defattr(-,root,root,-)
%gac_dll I18N.MidEast
%gac_dll I18N.Rare
%gac_dll I18N.Other

%files extras
%defattr(-,root,root,-)
%mono_bin mono-service
%{_bindir}/mono-service2
%{_mandir}/man1/mono-service.1.gz
%gac_dll Mono.Messaging
%gac_dll Mono.Messaging.RabbitMQ
%gac_dll RabbitMQ.Client
%gac_dll System.Configuration.Install
%gac_dll System.Management
%gac_dll System.Messaging
%gac_dll System.Runtime.Caching
%gac_dll System.ServiceProcess
%gac_dll System.Xaml
%{mono_dir}/?.?/RabbitMQ.Client.Apigen*
%{mono_dir}/gac/mono-service

%files winforms
%defattr(-,root,root,-)
%gac_dll Accessibility
%gac_dll Mono.WebBrowser
%gac_dll System.Design
%gac_dll System.Drawing.Design
%gac_dll System.Windows.Forms
%gac_dll System.Windows.Forms.DataVisualization

%files wcf
%defattr(-, root, root, -)
%mono_bin svcutil
%gac_dll System.Data.Services
%gac_dll System.IdentityModel
%gac_dll System.IdentityModel.Selectors
%gac_dll System.Runtime.DurableInstancing
%gac_dll System.ServiceModel
%gac_dll System.ServiceModel.Activation
%gac_dll System.ServiceModel.Discovery
%gac_dll System.ServiceModel.Routing
%gac_dll System.ServiceModel.Web
# wcf-devel
%{_libdir}/pkgconfig/wcf.pc

%files winfx
%defattr(-, root, root)
%gac_dll System.Data.Services.Client
%gac_dll WindowsBase

%files web
%defattr(-,root,root,-)
%dir %{_sysconfdir}/mono/mconfig
%config (noreplace) %{_sysconfdir}/mono/browscap.ini
%config (noreplace) %{_sysconfdir}/mono/mconfig/config.xml
%config (noreplace) %{_sysconfdir}/mono/2.0/Browsers
%config (noreplace) %{_sysconfdir}/mono/2.0/DefaultWsdlHelpGenerator.aspx
%config (noreplace) %{_sysconfdir}/mono/2.0/web.config
%config (noreplace) %{_sysconfdir}/mono/4.0/Browsers
%config (noreplace) %{_sysconfdir}/mono/4.0/DefaultWsdlHelpGenerator.aspx
%config (noreplace) %{_sysconfdir}/mono/4.0/web.config
%config (noreplace) %{_sysconfdir}/mono/4.5/Browsers
%config (noreplace) %{_sysconfdir}/mono/4.5/DefaultWsdlHelpGenerator.aspx
%config (noreplace) %{_sysconfdir}/mono/4.5/web.config
%mono_bin disco
%mono_bin mconfig
%mono_bin soapsuds
%mono_bin wsdl
%{_bindir}/wsdl2
%mono_bin xsd
%{_mandir}/man1/disco.1.gz
%{_mandir}/man1/mconfig.1.gz
%{_mandir}/man1/soapsuds.1.gz
%{_mandir}/man1/wsdl.1.gz
%{_mandir}/man1/xsd.1.gz
%gac_dll Microsoft.Web.Infrastructure
%gac_dll Mono.Http
%gac_dll System.ComponentModel.Composition
%gac_dll System.ComponentModel.DataAnnotations
%gac_dll System.Runtime.Remoting
%gac_dll System.Runtime.Serialization.Formatters.Soap
%gac_dll System.Web
%gac_dll System.Web.Abstractions
%gac_dll System.Web.ApplicationServices
%gac_dll System.Web.Http
%gac_dll System.Web.Http.SelfHost
%gac_dll System.Web.Http.WebHost
%gac_dll System.Web.Razor
%gac_dll System.Web.Routing
%gac_dll System.Web.Services
%gac_dll System.Web.WebPages
%gac_dll System.Web.WebPages.Deployment
%gac_dll System.Web.WebPages.Razor

%files mvc
%defattr(-, root, root,-)
%gac_dll System.Web.DynamicData
%gac_dll System.Web.Extensions
%gac_dll System.Web.Extensions.Design
%gac_dll System.Web.Mvc
%{mono_dir}/compat-2.0/System.Web.Extensions.Design.dll
%{mono_dir}/compat-2.0/System.Web.Extensions.dll
%{mono_dir}/compat-2.0/System.Web.Mvc.dll
# mvc-devel
%{_libdir}/pkgconfig/system.web.extensions.design_1.0.pc
%{_libdir}/pkgconfig/system.web.extensions_1.0.pc
%{_libdir}/pkgconfig/system.web.mvc.pc
%{_libdir}/pkgconfig/system.web.mvc2.pc
%{_libdir}/pkgconfig/system.web.mvc3.pc

%files entityframework
%defattr(-, root, root)
%gac_dll EntityFramework
%gac_dll EntityFramework.SqlServer

%files reactive
%defattr(-, root, root)
%gac_dll System.Reactive.Core
%gac_dll System.Reactive.Debugger
%gac_dll System.Reactive.Experimental
%gac_dll System.Reactive.Interfaces
%gac_dll System.Reactive.Linq
%gac_dll System.Reactive.Observable.Aliases
%gac_dll System.Reactive.PlatformServices
%gac_dll System.Reactive.Providers
%gac_dll System.Reactive.Runtime.Remoting
%gac_dll System.Reactive.Windows.Forms
%gac_dll System.Reactive.Windows.Threading
# reactive-devel
%{_libdir}/pkgconfig/reactive.pc

%files data
%defattr(-,root,root,-)
%mono_bin sqlsharp
%mono_bin sqlmetal
%{_mandir}/man1/sqlsharp.1.gz
%gac_dll Mono.Data.Tds
%gac_dll Novell.Directory.Ldap
%gac_dll System.Data
%gac_dll System.Data.DataSetExtensions
%gac_dll System.Data.Linq
%gac_dll System.DirectoryServices
%gac_dll System.DirectoryServices.Protocols
%gac_dll System.EnterpriseServices
%gac_dll System.Runtime.Serialization
%gac_dll System.Transactions
%gac_dll WebMatrix.Data

%files data-sqlite
%defattr(-,root,root,-)
%gac_dll Mono.Data.Sqlite

%files data-oracle
%defattr(-,root,root,-)
%gac_dll System.Data.OracleClient

%files data-postgresql
%defattr(-,root,root,-)
%gac_dll Npgsql

%files -n ibm-data-db2
%defattr(-,root,root,-)
%gac_dll IBM.Data.DB2

%files -n monodoc
%defattr(-, root, root)
%{_bindir}/mdass*
%mono_bin mdoc
%{_bindir}/mdoc-*
%{_bindir}/mdval*
%mono_bin mod
%{_bindir}/monodoc*
%{_mandir}/man1/md*
%{_mandir}/man1/monodoc*
%{_mandir}/man5/mdoc*
%{mono_dir}/4.0/monodoc.dll
%{mono_dir}/gac/monodoc
%{mono_dir}/monodoc/*
%ifnarch  ppc
%{_prefix}/lib/monodoc
%endif
# monodoc-devel
%{_libdir}/pkgconfig/monodoc.pc

%changelog
* Thu Mar 26 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.12.1-1
- updated to 3.12.1

* Fri Dec 27 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.10.8-2
- rebuild with VineSeed environment
- remove Requires:libgluezilla in monodoc

* Sun Jan 22 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.10.8-1
- updated mono to 2.10.8

* Sun Jan 22 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.10.8-1
- updated mono to 2.10.8

* Sat Oct 08 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.10.6-1
- updated mono to 2.10.6

* Sat May 07 2011 Shu KONNO <owa@bg.wakwak.com> 2.10.2-1
- updated mono to 2.10.2
- dropt Patch1: mono-2.10.1-ppc-len.patch (fixed in the upstream)

* Sun Apr 24 2011 Shu KONNO <owa@bg.wakwak.com> 2.10.1-3
- added '--with-sgen=no' to all arch
- dropt %%{mono_dir}/2.0/{mcs.exe,mscorlib.dll}.so

* Sat Apr 16 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.10.1-2
- remove the old ppc patch (similar codes already in the upstream)
- add Patch1 (from Gentoo)
- mono/2.0/mcs.exe.so not available on ppc - remove from the filelist
  (TODO: see the Fedora's srpm - removing mono/2.0/{mcs,gmcs}.exe.so etc.)

* Sun Apr 03 2011 Shu KONNO <owa@bg.wakwak.com> 2.10.1-1
- updated mono to 2.10.1

* Sat Jan 08 2011 Shu KONNO <owa@bg.wakwak.com> 2.8.2-1
- updated mono to 2.8.2

* Tue Dec 14 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.8.1-2
- add Patch0 (mono-2.8.1-ppc.patch)
- add configure option "--with-sgen=no" and "--disable-system-aot" (ppc only)
- fix %%files (add %%ifnarch ppc)

* Sun Nov 21 2010 Shu KONNO <owa@bg.wakwak.com> 2.8.1-1
- updated mono to 2.8.1

* Sat Nov 06 2010 Shu KONNO <owa@bg.wakwak.com> 2.8-2
- comment out script that removes prebuilt binaries, because gmcs.exe require

* Fri Oct 08 2010 Shu KONNO <owa@bg.wakwak.com> 2.8-1
- updated mono to 2.8
- modified macros used in %%files
- removed below:
  - packages:
    %{name}-jscript, %{name}-data-sybase, %{name}-data-firebird, bytefx-data-mysql
  - libraries:
    ByteFX.Data, FirebirdSql.Data.Firebird
    Mono.Data Mono.Data.TdsClient, Mono.Data.SybaseClient, Mono.Data.SqliteClient
    Microsoft.JScript, Microsoft.Vsa
  - commands:
    cilc, mjs, prj2make (replaced by xbuild)

* Tue Sep 21 2010 IWAI, Masaharu <iwai@alib.jp> 2.6.7-2
- build with rpm-4.8.1-1 for pkg-config file

* Mon Jul 26 2010 Shu KONNO <owa@bg.wakwak.com> 2.6.7-1
- updated mono to 2.6.7

* Thu Apr 08 2010 Shu KONNO <owa@bg.wakwak.com> 2.6.4-1
- updated mono to 2.6.4

* Thu Apr 08 2010 Shu KONNO <owa@bg.wakwak.com> 2.6.3-1
- updated mono to 2.6.3
  added RabbitMQ.Client.Apigen.exe

* Thu Dec 31 2009 Shu KONNO <owa@bg.wakwak.com> 2.6.1-2
- unuse _smp_mflags

* Sat Dec 26 2009 Shu KONNO <owa@bg.wakwak.com> 2.6.1-1
- updated mono to 2.6.1
- simplified macros

* Mon Dec 14 2009 Shu KONNO <owa@bg.wakwak.com> 2.4.3-1
- updated mono to 2.4.3
  added %%{mono_dir}/2.0/lc.exe*
  added %%gac_dll System.Web.Mvc
  added %%{mono_dir}/xbuild/*
  added %%{_mandir}/man1/lc.1.gz
  added %%{_mandir}/man1/xbuild.1.gz

* Wed Jul 29 2009 Shu KONNO <owa@bg.wakwak.com> 2.4.2.3-1
- updated mono to 2.4.2.3

* Fri Jul 24 2009 Shu KONNO <owa@bg.wakwak.com> 2.4.2.2-1
- updated mono to 2.4.2.2

* Tue Jul 07 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.4.2.1-1
- new upstream release
- build with latest rpm to update mono-dependencies

* Thu Jul 02 2009 Shu KONNO <owa@bg.wakwak.com> 2.4.2-1
- updated mono to 2.4.2

* Mon Apr 27 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.4-3
- fix temporary workaround against build failure on ppc,
  from RH bugzilla #494026
  - statically link mono to libmono: remove "--disable-static" from configure
  - ensure removing *.a files in the install section
- remove prebuilt binaries under mcs/class/lib/monolite/ before building

* Sun Apr  5 2009 Shu KONNO <owa@bg.wakwak.com> 2.4-2
- fixed paths using %%mono_dir, %%mono_doc macros
- added Requires:libgluezilla >= 2.4 in monodoc

* Sat Apr  4 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4-1
- new upstream release
- added monodoc package (Obsoletes: monodoc-core <= 2.0-1vl5)

* Mon Nov 03 2008 Shu KONNO <owa@bg.wakwak.com> 2.0.1-1
- new upstream release
- dropt %%{_bindir}/mono-find-{provides,requires}
- added --with-libgdiplus=installed

* Mon Oct 06 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0-3
- update to mono-2.0 released source
- BR: libgdiplus-devel >= 2.0

* Fri Sep 26 2008 Shu KONNO <owa@bg.wakwak.com> 2.0-2vl5
- removed *.la

* Wed Sep 17 2008 Shu KONNO <owa@bg.wakwak.com> 2.0-1vl5
- updated mono to 2.0
- updated url
- changed macro %%monodir to %%mono_dir
- dropt mono-1.1.13.4-selinux-ia64.patch
- dropt mono-1.1.13.4-ppc-threading.patch
- dropt mono-1.2.3-use-monodir.patch

* Tue Aug 26 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.5.1-1vl5
- applied new versioning policy, spec in utf-8
- dropt mono-1.2.5-libdir.patch
- reverted monodir macro to using %%{_prefix}/lib/mono

* Sat Dec 29 2007 Shu KONNO <owa@bg.wakwak.com> 1.2.5.1-0vl2
- updated monodir to %%{_libdir}/mono

* Sat Sep 22 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.5.1-0vl1
- new upstream release
- splited mono-basic package

* Sat Oct 14 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.13.8.1-0vl1
- new upstream release

* Fri May  5 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.13.6-0vl1
- new upstream release

* Thu Apr 13 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.1.13.4-2vl2
- disabled Patch2 on Vine/ppc environment

* Wed Mar 29 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.13.4-2vl1
- updated source and sub-packages based on Fedora packages
  * Tue Feb 22 2005 Satoshi MACHINO <machino@vinelinux.org> 1.0.6-0vl1
  - new upstream version(mono-1.0.6)
  * Sun Jan 16 2005 Satoshi MACHINO <machino@vinelinux.org> 1.0.5-0vl1
  - new upstream version(mono-1.0.5)
  * Sat Nov 06 2004 Satoshi MACHINO <machino@vinelinux.org> 1.0.4-0vl1
  - new upstream version(mono-1.0.4)
	-- changed to use configure 
  * Sun Oct 24 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.2-0vl1
  - rebuild for Vine Linux (based on mono.spec inside src archive)
  - Fixed BuildRequires: gc-devel, libicu-devel
  - add Japanese translation

* Fri Mar 10 2006 Bill Nottingham <notting@redhat.com> - 1.1.13.4-2
- rebuild for ppc TLS issue (#184446)

* Fri Mar  3 2006 Christopher Aillon <caillon@redhat.com> - 1.1.13.4-1
- Update to 1.1.13.4
- Add patch so mono doesn't segfault on PPC SMP machines
- Minor spec cleanup

* Thu Mar  2 2006 Ray Strode <rstrode@redhat.com> - 1.1.13.2-5
- Updated patch from Jakub (1.1.13.2-3 to 1.1.13.2-5 are 
  for bug 182965)

* Tue Feb 28 2006 Ray Strode <rstrode@redhat.com> - 1.1.13.2-4
- Updated patch from Paolo Molaro <lupus@ximian.com>

* Mon Feb 27 2006 Ray Strode <rstrode@redhat.com> - 1.1.13.2-3
- Patch from Jakub to make work with SELinux better

* Sun Feb 12 2006 Christopher Aillon <caillon@redhat.com> - 1.1.13.2-2
- Rebuild

* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.1.13.2-1.1
- rebuilt for new gcc4.1 snapshot and glibc changes

* Tue Jan 31 2006 Christopher Aillon <caillon@redhat.com> - 1.1.13.2-1
- Update to 1.1.13.2

* Fri Jan 13 2006 Alexander Larsson <alexl@redhat.com> - 1.1.13-1
- Update to 1.13
- Add libgdiplus dep to mono-core
- Add s390x to build

* Mon Jan  9 2006 Alexander Larsson <alexl@redhat.com> - 1.1.12.1-1
- Update to 1.1.12.1

* Mon Jan  9 2006 Alexander Larsson <alexl@redhat.com> - 1.1.10-4
- rebuild

* Fri Nov 18 2005 Alexander Larsson <alexl@redhat.com> 1.1.10-3
- Disable s390 due to some build failure

* Thu Nov 17 2005 Alexander Larsson <alexl@redhat.com> 1.1.10-2
- Build on s390 and x86-64 now

* Tue Nov 15 2005 Alexander Larsson <alexl@redhat.com> - 1.1.10-1
- Initial version
