File mono-tools.spec of Package mono-tools

#
# spec file for package mono-tools
#
# 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:           mono-tools
Version:        4.2
Release:        0
Summary:        Collection of Tools and Utilities for Mono
License:        GPL-2.0 and LGPL-2.0 and MIT
Group:          Development/Tools/Other
Url:            https://github.com/mono/mono-tools
Source:         http://download.mono-project.com/sources/mono-tools/%{name}-%{version}.tar.gz
#PATCH-FIX-UPSTREAM no rule to make target gui-compare.exe.mdb
# because it shouldn't be in DATA
Patch:          mono-tools-3.10-gui-compare.exe.mdb.patch
#PATCH-FIX-UPSTREAM echo to doc/*.source
# but doc doesn't exist at the first place
Patch1:         mono-tools-3.10-make-doc-dir.patch
# PATCH-FIX-OPENSUSE fix build with mono 5.10 and up
Patch2:         mono-510-build-fix.patch
BuildRequires:  automake
BuildRequires:  fdupes
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  libtool
BuildRequires:  update-desktop-files
BuildRequires:  zip
BuildRequires:  pkgconfig(glade-sharp-2.0)
BuildRequires:  pkgconfig(glib-sharp-2.0)
BuildRequires:  pkgconfig(gnome-sharp-2.0)
BuildRequires:  pkgconfig(mono)
BuildRequires:  pkgconfig(mono-nunit)
BuildRequires:  pkgconfig(monodoc)
%if 0%{?suse_version} < 1330 && 0%{?sle_version} < 120300
BuildRequires:  pkgconfig(webkit-sharp-1.0)
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Mono Tools is a collection of development and testing programs and
utilities for use with Mono.

%package -n monodoc-http
Summary:        ASP.NET front-end for displaying Monodoc documentation
License:        MIT
Group:          Development/Tools/Other

%description -n monodoc-http
Monodoc-http provides an ASP.NET front-end for displaying installed
Monodoc documentation.

%package devel
Summary:        The pkgconfig files for Mono Tools
License:        MIT
Group:          Development/Tools/Other

%description devel
Contains the pkgconfig files. Only required for developers.

%prep
%setup -q
%patch -p1
%patch1 -p1
%patch2 -p1

%build
aclocal
automake
./configure --prefix=%{_prefix} \
	--libdir=%{_libexecdir} \
	--sysconfdir=%{_sysconfdir} \
	--mandir=%{_mandir}
# multi thread will cause racing problem when zip gendarme templates
make -j1

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

# Move create-native-map stuff out of lib into share
mkdir %{buildroot}/%{_datadir}/create-native-map
mv %{buildroot}/%{_libexecdir}/create-native-map/MapAttribute.cs %{buildroot}/%{_datadir}/create-native-map
mv %{buildroot}/%{_libexecdir}/pkgconfig %{buildroot}/%{_datadir}

%suse_update_desktop_file monodoc
%suse_update_desktop_file gendarme-wizard
%suse_update_desktop_file gsharp
%if 0%{?suse_version} < 1330 && 0%{?sle_version} < 120300
%suse_update_desktop_file ilcontrast
%endif

%find_lang %{name}

%fdupes %{buildroot}

%files -f %{name}.lang
%defattr(-, root, root)
%{_bindir}/create-native-map
%{_bindir}/emveepee
%{_bindir}/gendarme
%{_bindir}/gendarme-wizard
%{_bindir}/gd2i
%{_bindir}/gsharp
%{_bindir}/gui-compare
%{_bindir}/minvoke
%{_bindir}/monodoc
%{_bindir}/mperfmon
%{_bindir}/mprof-decoder
%{_bindir}/mprof-heap-viewer
%{_datadir}/applications/gendarme-wizard.desktop
%{_datadir}/applications/gsharp.desktop
%{_datadir}/applications/monodoc.desktop
%{_datadir}/create-native-map
%{_datadir}/icons/hicolor/*/apps/monodoc.png
%{_datadir}/pixmaps/gendarme.svg
%{_datadir}/pixmaps/monodoc.png
%{_mandir}/man1/create-native-map*
%{_mandir}/man1/gd2i*
%{_mandir}/man1/gendarme*
%{_mandir}/man1/mperfmon*
%{_mandir}/man1/mprof-decoder*
%{_mandir}/man1/mprof-heap-viewer*
%{_mandir}/man5/gendarme*
%{_libexecdir}/create-native-map
%{_libexecdir}/gendarme
%{_libexecdir}/gsharp
%{_libexecdir}/gui-compare
%{_libexecdir}/minvoke
%{_libexecdir}/monodoc/*.dll*
%{_libexecdir}/monodoc/*.exe*
%{_libexecdir}/monodoc/sources
%{_libexecdir}/mono-tools
%{_libexecdir}/mperfmon
%if 0%{?suse_version} < 1330 && 0%{?sle_version} < 120300
%{_bindir}/ilcontrast
%{_datadir}/applications/ilcontrast.desktop
%{_datadir}/pixmaps/ilcontrast.png
%{_libexecdir}/ilcontrast
%endif

%files -n monodoc-http
%defattr(-, root, root)
%{_libexecdir}/monodoc/web

%files devel
%defattr(-, root, root)
%{_datadir}/pkgconfig/create-native-map.pc
%{_datadir}/pkgconfig/gendarme-framework.pc

%changelog
openSUSE Build Service is sponsored by