%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) Summary: A native OODBMS for Java/.NET/Mono - Mono version Name: db4o Version: 8.0 Release: 2%{?dist} License: GPLv2 Patch0: db4o-8.0-make.patch Patch1: db4o-8.0-mono-reflection.patch Patch2: db4o-8.0-CecilFix.patch Patch3: db4o-8.0-noGetOptions2.patch Patch4: db4o-8.0-extensions-make-fix.patch Patch5: db4o-8.0-more-makefile-fixes.patch Patch6: db4o-8.0-db4otool-testfix.patch Group: Development/Libraries Source: http://www.db4o.com/downloads/%{name}-%{version}-net35.zip URL: http://www.db4o.com/ BuildRequires: mono-devel, mono-cecil-flowanalysis-devel BuildRequires: mono-reflection-devel, dos2unix ExclusiveArch: %ix86 x86_64 ia64 %{arm} sparc alpha s390x %description Embed db4o's native Java or .NET/Mono open source object database engine into your product and experience unparalleled ease-of-use. db4o is simple to install, integrate, and deploy. %package doc Summary: Documentation and API for db4o Requires: %{name} = %{version}-%{release} Group: Documentation %description doc Tutorials and API documentation for db4o %package devel Summary: Development file for db4o Requires: %{name} = %{version}-%{release} pkgconfig Group: Development/Libraries %description devel Development files for db4o %prep %setup -q %patch0 -p1 -b .makepatch %patch1 -p1 -b .mono-reflection %patch2 -p1 -b .CecilFix dos2unix src/Db4oTool/Db4oTool/Program.cs dos2unix src/Db4oTool/Db4oTool/ProgramOptions.cs dos2unix src/Db4oTool/Db4oTool/Properties/AssemblyInfo.cs %patch3 -p1 -b .noGetOptions %patch4 -p1 -b .extensions-make-fix %patch5 -p1 -b .makefix %patch6 -p1 -b .TestFix cp %{_libdir}/mono-source-libs/Options.cs src/Db4oTool/Db4oTool/ #sed -i 's/\r//' doc/tutorial/vb/index.html #sed -i 's/\r//' doc/tutorial/index.html sed 's!/usr/lib!%{_libdir}!' -i src/Makefile rm -rf src/Libs/* sed -i 's|Mono.Cecil.dll|%{_libdir}/mono/gac/Mono.Cecil/%{cecilver}__%{ceciltoken}/Mono.Cecil.dll|' src/include.mk sed -i 's|Cecil.FlowAnalysis.dll|%{_libdir}/mono/Cecil.FlowAnalysis/Cecil.FlowAnalysis.dll|' src/include.mk sed -i 's|Mono.GetOptions.dll|%{_libdir}/mono/2.0/Mono.GetOptions.dll|' src/include.mk sed -i 's|Mono.Reflection.dll|%{_libdir}/mono/Mono.Reflection/Mono.Reflection.dll|' src/include.mk %build rm -rf %{buildroot} cd src make core cs optional nq linq tool %install mkdir -p %{buildroot}/%{_libdir}/pkgconfig mkdir -p %{buildroot}/%{_libdir}/mono/gac mkdir -p %{buildroot}/%{_bindir} gacutil -i src/bin/Db4objects.Db4o.dll -f -package db4o -root %{buildroot}%{_libdir} gacutil -i src/bin/Db4objects.Db4o.CS.dll -f -package db4o -root %{buildroot}%{_libdir} gacutil -i src/bin/Db4objects.Db4o.Instrumentation.dll -f -package db4o -root %{buildroot}%{_libdir} gacutil -i src/bin/Db4objects.Db4o.Linq.dll -f -package db4o -root %{buildroot}%{_libdir} gacutil -i src/bin/Db4objects.Db4o.NativeQueries.dll -f -package db4o -root %{buildroot}%{_libdir} gacutil -i src/bin/Db4objects.Db4o.Optional.dll -f -package db4o -root %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_libdir}/mono/db4o cp src/bin/* %{buildroot}%{_libdir}/mono/db4o cat <%{buildroot}/%{_libdir}/pkgconfig/db4o.pc prefix=%{_prefix} exec_prefix=%{_prefix} libdir=%{_libdir} Name: db4o Description: db4o - an object based database system Version: 8.0 Libs: -r:%{_libdir}/mono/db4o/Db4objects.Db4o.dll, -r:%{_libdir}/mono/db4o/Db4objects.Db4o.CS.dll, -r:%{_libdir}/mono/db4o/Db4objects.Db4o.Instrumentation.dll, -r:%{_libdir}/mono/db4o/Db4objects.Db4o.Linq.dll -r:%{_libdir}/mono/db4o/Db4objects.Db4o.NativeQueries.dll, -r:%{_libdir}/mono/db4o/Db4objects.Db4o.Optional.dll EOF cat <%{buildroot}/%{_bindir}/Db4oTool #!/bin/sh env mono %{_libdir}/mono/db4o/Db4oTool.exe "$@" EOF chmod 755 %{buildroot}/%{_bindir}/Db4oTool %files %{_bindir}/* %{_libdir}/mono/db4o/ %{_libdir}/mono/gac/Db4* %files doc %doc doc/* %files devel %{_libdir}/pkgconfig/db4o.pc %changelog * Fri Jul 01 2011 Dan HorĂ¡k - 8.0-2 - updated the supported arch list * Wed Jun 29 2011 Tom Callaway - 8.0-1 - update to 8.0 * Wed Jun 01 2011 Paul Whalen - 7.4-4 - Added correct arm macro to ExclusiveArch * Tue Feb 08 2011 Fedora Release Engineering - 7.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Jan 20 2010 Paul F. Johnson 7.4-2 - Fix the names for the files the binaries link to * Wed Jan 20 2010 Paul F. Johnson 7.4-1 - Big update - Fix URL - Lots of spec file fixes * Fri Apr 10 2009 Paul F. Johnson 6.1-5 - Alter excludearch to exclusivearch - Remove ppc build * Thu Feb 05 2009 Paul F. Johnson 6.1-4.1 - rebuild * Wed Apr 9 2008 Tom "spot" Callaway - 6.1-4 - rework package to use system libraries, not bundled binary copies * Tue Feb 19 2008 Fedora Release Engineering - 6.1-3 - Autorebuild for GCC 4.3 * Tue Feb 06 2007 Paul F. Johnson 6.1-2 - bump - spec file fixes - new scripts for usr-bin links to the libdir * Thu Nov 23 2006 Paul F. Johnson 6.0.3-2 - corrected the pc file * Wed Nov 22 2006 Paul F. Johnson 6.0.3-1 - bump to new dev version - minor spec file fixes * Wed Aug 24 2006 Paul F. Johnson 5.5-10 - Removed monodir hack - Added makefile patch - Added release requirement for docs subpackage * Wed Aug 09 2006 Paul F. Johnson 5.5-8 - Fixed a few other bits - Changed from Dev/Doc to just Doc for the doc package - Removed debug-package (empty) - Added R pkg-config to the devel package * Tue Aug 08 2006 Paul F. Johnson 5.5-6 - Added back in the gac lines. D'oh! Must read docs fully---must read docs... * Tue Aug 08 2006 Paul F. Johnson 5.5-5 - Removed the gacutil entry - Fixed binary duplicates - Added pc file (means that -pkg:db4o can now be used on the command line) * Tue Aug 08 2006 Paul F. Johnson 5.5-2 - Fixed source URL - removed R mono - added documentation subpackage * Mon Aug 07 2006 Paul F. Johnson 5.5-1 - initial import to FE - many changes to spec file to comply with FE packaging - added gacutil line to the build