Blob Blame History Raw
%define debug_package %{nil}

%define cecilver %(gacutil -l Mono.Cecil |grep Mono.Cecil | cut -d "=" -f 2 | cut -d "," -f 1)
%define ceciltoken %(gacutil -l Mono.Cecil |grep Mono.Cecil | cut -d "=" -f 4)
%define cecilmdbver %(gacutil -l Mono.Cecil.Mdb |grep Mono.Cecil.Mdb | cut -d "=" -f 2 | cut -d "," -f 1)
%define cecilmdbtoken %(gacutil -l Mono.Cecil.Mdb |grep Mono.Cecil.Mdb | cut -d "=" -f 4)

Summary: A full-featured IDE for Mono and Gtk sharp
Name: monodevelop
Version: 1.9
Release: 3%{?dist}
License: GPLv2+
Group: Development/Tools
Source0: http://go-mono.com/sources/%{name}/%{name}-%{version}.tar.bz2
URL: http://www.monodevelop.com/
Patch0: monodevelop-libdir.patch
Patch1: monodevelop-config.patch
Patch2: monodevelop-0.19-use-system-Mono.Cecil.patch
Patch3: mdtool.patch
Patch4: monodevelop-1.9-configure.patch
Patch5: monodevelop-1.9-use-system-cecil.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: mono-devel, gtk-sharp2-devel, intltool, gettext-devel, bytefx-data-mysql, mono-data-postgresql, mono-data-oracle, mono-data-sqlite, mono-data-sybase, gtk-sharp2-gapi, shared-mime-info, pkgconfig, gtksourceview2-sharp-devel, monodoc-devel, subversion-devel desktop-file-utils,boo-devel
BuildRequires: gecko-sharp2-devel gtk-sharp2-devel gnome-sharp-devel mono-core
BuildRequires: autoconf libtool automake mono-nunit-devel mono-nunit22-devel mono-nunit mono-basic-devel gtksourceview2-sharp-devel mono-tools-devel gnome-desktop-sharp-devel
%ifarch !ppc
BuildRequires: boo-devel
Requires: boo
%endif
%if 0%{?fedora} > 8
BuildRequires: mono-addins-devel
Requires: mono-addins
%endif
Requires: mono-core, monodoc, gecko-sharp2, gtksourceview2-sharp bytefx-data-mysql mono-data-postgresql mono-data-sybase mono-data-oracle, mono-nunit, apr, gtk-sharp2-gapi, gnome-sharp, firefox > 1.99, xsp, subversion, mono-data-sqlite
Requires: mono-tools
# ikvm doesn't build from source at the moment. If it does at some point in the future, uncomment this line.
# Requires: ikvm
ExclusiveArch: %ix86 x86_64 ia64 armv4l sparc alpha
# Sorry ppc/ppc64. No mono-nunit22 (because of no nant) means no monodevelop.

%description
This package provides MonoDevelop, a full-featured IDE for Mono
with syntax colouring, code completion, debugging, project 
management and support for C sharp, Visual Basic.NET, Java, Boo,
Nemerle and MSIL.

%package devel
Summary: Development files for monodevelop
Group: Development/Libraries
Requires: %{name} = %{version}-%{release} pkgconfig
 
%description devel
Development files for monodevelop

%prep
%setup -q 
%patch0 -p1 -b .orig
sed -i -e 's!@libdir@!%{_libdir}!' %{PATCH3}
%patch3 -p1 -b .orig
sed -i -e 's!%{_libdir}!@libdir@!' %{PATCH3}
%patch1 -p1 -b .orig
%patch4 -p1 -b .configure

# rebuild conffiles
autoreconf -f -i -s

%patch2 -p1 -b .use-system-Mono.Cecil
%patch5 -p1 -b .use-system-mono-1.9

# Here is where we replace the LONGCECILSTRING LONGCECILMDBSTRING placeholders with the actual
# values for the Mono.Cecil and Mono.Cecil.Mdb ver__token
sed -i 's|LONGCECILSTRING|%{cecilver}__%{ceciltoken}|g' src/addins/MonoDevelop.GtkCore/lib/Makefile.am
sed -i 's|LONGCECILSTRING|%{cecilver}__%{ceciltoken}|g' src/addins/MonoDevelop.GtkCore/lib/Makefile.in
sed -i 's|LONGCECILSTRING|%{cecilver}__%{ceciltoken}|g' src/addins/MonoDevelop.GtkCore/lib/stetic/libsteticui/Makefile.am
sed -i 's|LONGCECILSTRING|%{cecilver}__%{ceciltoken}|g' src/addins/MonoDevelop.GtkCore/Makefile.am
sed -i 's|LONGCECILSTRING|%{cecilver}__%{ceciltoken}|g' src/addins/MonoDevelop.GtkCore/Makefile.in
sed -i 's|LONGCECILSTRING|%{cecilver}__%{ceciltoken}|g' src/core/MonoDevelop.Projects/Makefile.am
sed -i 's|LONGCECILSTRING|%{cecilver}__%{ceciltoken}|g' src/core/MonoDevelop.Projects/Makefile.in
sed -i 's|LONGCECILSTRING|%{cecilver}__%{ceciltoken}|g' src/addins/MonoDevelop.DesignerSupport/Makefile.in
sed -i 's|LONGCECILSTRING|%{cecilver}__%{ceciltoken}|g' src/addins/MonoDevelop.DesignerSupport/Makefile.am
sed -i 's|LONGCECILSTRING|%{cecilver}__%{ceciltoken}|g' src/addins/MonoDevelop.AssemblyBrowser/Makefile.in
sed -i 's|LONGCECILSTRING|%{cecilver}__%{ceciltoken}|g' src/addins/MonoDevelop.AssemblyBrowser/Makefile.am
sed -i 's|LONGCECILMDBSTRING|%{cecilmdbver}__%{cecilmdbtoken}|g' src/core/MonoDevelop.Projects/Makefile.am
sed -i 's|LONGCECILMDBSTRING|%{cecilmdbver}__%{cecilmdbtoken}|g' src/core/MonoDevelop.Projects/Makefile.in

##delete prebuilt nunit
rm -rf src/addins/NUnit/lib/*
# Now, copy our built from source nunit. We'd really prefer it just used the system nunit bits
# but monodevelop is really stubborn.
cp %{_libdir}/mono/nunit22/nunit.core.dll src/addins/NUnit/lib/
cp %{_libdir}/mono/nunit22/nunit.framework.dll src/addins/NUnit/lib/

%build
%configure --enable-versioncontrol --prefix=%{_prefix} --libdir=%{_libdir} --enable-gnomeplatform --enable-c --enable-gtksourceview2  --enable-monoextensions
make
# no smp flags as it falls over during the build (race condition)

%install
%{__rm} -rf %{buildroot}
make DESTDIR=%{buildroot} install
%find_lang %{name}
desktop-file-install --vendor fedora \
        --dir %{buildroot}%{_datadir}/applications \
        --add-category X-Fedora \
        --delete-original \
        %{buildroot}%{_datadir}/applications/monodevelop.desktop

#remove package mime caches
%{__rm} -f %{buildroot}%{_datadir}/mime/XMLnamespaces
%{__rm} -f %{buildroot}%{_datadir}/mime/aliases
%{__rm} -f %{buildroot}%{_datadir}/mime/application/*
%{__rm} -f %{buildroot}%{_datadir}/mime/text/*
%{__rm} -f %{buildroot}%{_datadir}/mime/globs
%{__rm} -f %{buildroot}%{_datadir}/mime/magic
%{__rm} -f %{buildroot}%{_datadir}/mime/subclasses
%{__rm} -f %{buildroot}%{_datadir}/mime/mime.cache
%{__rm} -f %{buildroot}%{_datadir}/applications/mimeinfo.cache

%post
update-mime-database %{_datadir}/mime &> /dev/null || :
update-desktop-database &> /dev/null || :

%postun
update-mime-database %{_datadir}/mime &> /dev/null || :
update-desktop-database &> /dev/null || :

%files -f %{name}.lang
%defattr (-,root,root,-)
%{_bindir}/mdtool
%{_bindir}/monodevelop
%doc AUTHORS COPYING ChangeLog README
%{_libdir}/monodevelop/
%{_datadir}/mime/packages/monodevelop.xml
%{_datadir}/applications/fedora-monodevelop.desktop
%{_datadir}/man/man1/mdtool.1.gz
%{_datadir}/man/man1/monodevelop.1.gz
%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
%{_datadir}/icons/hicolor/22x22/apps/%{name}.png
%{_datadir}/icons/hicolor/24x24/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/mime/

%files devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/monodevelop*

%clean
%{__rm} -rf %{buildroot}

%changelog
* Fri Aug 08 2008 David Nielsen <gnomeuser@gmail.com> - 1.9-3
- rebase configure patch for fuzz
- file list fix up

* Thu Jul 10 2008 David Nielsen <gnomeuser@gmail.com> 1.9-2
- numerical compare for fedora version test, fixes compile on f10

* Mon Jul 07 2008 Paul F. Johnson <paul@all-the-johnsons.co.uk> 1.9-1
- bump to latest beta for md2
- fixes to patch files for mono.cecil
- fix the archs to be mono package happy
- spec file fixes

* Tue May 06 2008 Paul F. Johnson <paul@all-the-johnsons.co.uk> 1.0-6
- added br mono-tools
- removed prepackaged mime

* Thu May 01 2008 Paul F. Johnson <paul@all-the-johnsons.co.uk> 1.0-5.1
- attempt a fix for a text editor to work
- rebuild

* Wed Apr 30 2008 Paul F. Johnson <paul@all-the-johnsons.co.uk> 1.0-4
- mdtool fix

* Wed Apr 30 2008 Paul F. Johnson <paul@all-the-johnsons.co.uk> 1.0-3
- remove BR ikvm-devel

* Fri Apr 25 2008 Paul F. Johnson <paul@all-the-johnsons.co.uk> 1.0-2
- add in gtksourceview2 support

* Mon Apr 21 2008 Paul F. Johnson <paul@all-the-johnsons.co.uk> 1.0-1
- bump to release

* Mon Apr 21 2008 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.19-7
- remove ppc specific stuff
- enabled gnomeplatform and c and c++ projects
- add BR monobasic
- remove the debug package

* Sat Apr 12 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.19-6
- disable Requires on ikvm, since ikvm doesn't build from source at the moment

* Fri Apr 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.19-5
- ExcludeArch ppc (no mono-nunit22, due to no nant, means no ppc)

* Fri Apr 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.19-4
- buildrequires mono-core for gacutil

* Fri Apr 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.19-3
- use system Mono.Cecil
- use copies of built from source nunit22 rather than bundling (upstream should really uncouple this)

* Thu Feb 21 2008 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.19-2
- added BR update-desktop-database

* Thu Feb 21 2008 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.19-1
- bump to preview 1

* Fri Jan 04 2008 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.18.1-1
- bump

* Wed Dec 19 2007 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.18-1
- fix for BR boo where boo is not supported
- bump to MD0.18

* Tue Nov 13 2007 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.17-4
- added R mono-data-sqlite

* Sun Nov 11 2007 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.17-3
- excludearch ppc64

* Sun Nov 11 2007 David Nielsen <david@lovesunix.net> - 0.17-2
- Remove support for Fedora < 5
- rediff config patch

* Thu Nov  8 2007 David Nielsen <david@lovesunix.net> - 0.17-1
- Update to MonoDevelop Beta 2

* Wed Oct 17 2007 David Nielsen <david@lovesunix.net> - 0.16
- Update to MonoDevelop Beta 1

* Sat Aug 11 2007 David Nielsen	<david@lovesunix.net> - 0.15
- bump to 0.15

* Thu Mar 08 2007 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.13.1-1
- bugfixes to the source

* Fri Feb 23 2007 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.13-1
- bump to new version

* Wed Dec 20 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.12-9
- disables version control
- requires gnome-sharp
- enable nemerle added
- enabled aspnet and aspnetedit (rawhide only - requires jscall-sharp)
- added R firefox > 1.99

* Wed Nov 01 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.12-7
- Added R gtk-sharp2-gapi

* Fri Oct 27 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.12-6
- fixed url
- added R apr-devel

* Wed Sep 27 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.12-5
- pkgconfig fix 

* Mon Sep 25 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.12-4
- added R mono-nunit

* Mon Sep 18 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.12-3
- rebuild to make use of the new boo

* Thu Sep 07 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.12-2
- minor spec file fixes

* Wed Sep 06 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.12-1
- Bump to new version
- Include the patches for all users
- Fixed so it uses ?fedora (silly me!)
- Added BR mono-nunit-devel (FC6)

* Mon Sep 04 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-21
- Revert 64 bit clean for FC-5 and still follow FC guidelines

* Sun Sep 03 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-20
- Added gtk sharp fix
- Added conditional so it builds for FC5

* Sun Aug 27 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-17
- 64 bit goodness restored

* Fri Aug 04 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-16
- fixed ownership problem in spec file
- added comment about the libdir hack

* Wed Aug 02 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-15
- removed R which, added R mono-nunit
- changed R bytefx-data-mysq to msql
- altered update-mime-info and added update-desktop-database
- added R pkgconfig to devel
- added comment as to why smp_flags are not used on the build

* Sat Jul 29 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-14
- Added additional Rs
- minor specfile tweaks

* Sun Jul 23 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-12
- fixed which problem
- fixes the libdir issue for 64 bit

* Sun Jul 09 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-11
- minor spec files changes to satisfy rpmlint
- added BR ikvm-devel

* Sun Jul 09 2006 John Mahowald  <jpmahowald@gmail.com> - 0.11-10
- libdir fixes
- BR mono-data-sqlite

* Sun Jul 09 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-9
- removed noarch
- added a couple of patches from the new nant package
- fixes for new mono guidelines

* Wed Jun 14 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-8
- Removed libdir hack
- Added BR pkgconfig
- Added R monodoc
- Altered configure line to satisfy the parts required

* Mon Jun 05 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-7
- Added additional fix for 64 bit systems

* Sun Jun 04 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-6
- Minor mod to the BR
- Fixed the desktop-file-install problem

* Sat Jun 03 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-5
- Removed duplicate desktop file

* Sat Jun 03 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-4
- Removed R filesystem
- Simplified mime-applications
- Added scriptlets to handle mime info
- Corrected handling of desktop icon
- Removed INSTALL file

* Sat Jun 03 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-3
- Added BR shared-mime-info
- Added R filesystem
- Made all of the bindir and datadir ownerships explicit

* Wed May 31 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-2
- Added devel
- Added fix for 64 bit systems

* Sun May 07 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.11-1
- bump to new version
- added exclude archs for x86_64 and ia64 due to build problems

* Wed Apr 26 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.10-8
- removed smp_flags
- added boo and ikvm support

* Sun Apr 23 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.10-7
- removed static usrlib
- added export macros to fix the x86_64 problem
- disabled boo

* Wed Apr 19 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.10-6
- spec file version correctly bumped
- small spec file fixed
- enable-boo and enable-java added to the %%configure line

* Mon Apr 18 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.10-5
- libdir now usr-lib irrespective of hardware built on

* Mon Apr 17 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.10-4
- Altered install script somewhat
- Changed the path for the monodevelop libdir to be FE compliant
- Fixed source and URL

* Sat Apr 15 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.10-3
- Add in boo and mono-debugger
- fixed a couple of minor spec file bugs
- fixed MonoDevelop.Core not being found in the addins

* Wed Apr 5 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.10-2
- Additional buildreqs and two typo fixed - thanks to Angel Marin again

* Wed Apr 5 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.10-1
- Bump to new version
- mods to spec file for new version

* Wed Apr 5 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.9-3
- minor tweaks
- fixed a couple of typos - thanks to Angel Marin for spotting them

* Wed Jan 25 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.9-2
- added deps for ikvm and bytefx-data-mysql
- removed language support for the moment

* Mon Jan 23 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 0.9-1
- Initial import