# Note: rpmlint complains that this package is not marked as # noarch. This is not really an error as this is current standard # practice for OCaml libraries even though they do not contain # architecture dependent files themselves (the devel packages do # instead). # # See https://www.redhat.com/archives/fedora-packaging/2008-August/msg00017.html # for a discussion and # https://www.redhat.com/archives/fedora-packaging/2008-August/msg00020.html # for a potential fix. However, this is probably not the time and # place to try to change the standard practice, so for now I will # follow standard practice. %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %global ocaml_destdir %{_libdir}/ocaml %global debug_package %{nil} Name: ocaml-ocamlgraph Version: 1.7 Release: 1%{?dist} Summary: OCaml library for arc and node graphs Group: Development/Libraries License: LGPLv2 with exceptions URL: http://ocamlgraph.lri.fr/ Source0: http://ocamlgraph.lri.fr/download/ocamlgraph-%{version}.tar.gz Source1: ocamlgraph-test.result # Fix the install-findlib rule, and install some extras. Patch0: ocamlgraph-1.7-install-extras.patch BuildRequires: libart_lgpl-devel BuildRequires: libgnomecanvas-devel BuildRequires: ocaml BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-lablgtk-devel BuildRequires: ocaml-ocamldoc ExclusiveArch: %{ocaml_arches} %global __requires_exclude ocaml\\\(Sig\\\) %description Ocamlgraph provides several different implementations of graph data structures. It also provides implementations for a number of classical graph algorithms like Kruskal's algorithm for MSTs, topological ordering of DAGs, Dijkstra's shortest paths algorithm, and Ford-Fulkerson's maximal-flow algorithm to name a few. The algorithms and data structures are written functorially for maximal reusability. Also has input and output capability for Graph Modeling Language file format and Dot and Neato graphviz (graph visualization) tools. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep %setup -q -n ocamlgraph-%{version} %patch0 cp -p %{SOURCE1} . # Remove spurious executable bits find . -name '*.ml*' -perm /0111 | xargs chmod a-x %build %configure %if %opt %global opt_option OCAMLBEST=opt OCAMLOPT=ocamlopt.opt %else %global opt_option OCAMLBEST=byte OCAMLC=ocamlc %endif make depend make %{opt_option} make doc %check make --no-print-directory check >& test diff -u test ocamlgraph-test.result %install mkdir -p %{buildroot}%{ocaml_destdir} make OCAMLFIND_DESTDIR=%{buildroot}%{ocaml_destdir} install-findlib mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}/ mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}-devel/examples/ mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}-devel/API/ cp -p LICENSE %{buildroot}%{_defaultdocdir}/%{name}-%{version}/ cp -p README %{buildroot}%{_defaultdocdir}/%{name}-%{version}-devel/ cp -p examples/*.ml %{buildroot}%{_defaultdocdir}/%{name}-%{version}-devel/examples/ cp -p doc/* %{buildroot}%{_defaultdocdir}/%{name}-%{version}-devel/API/ %files %{ocaml_destdir}/ocamlgraph/ %if %opt %exclude %{ocaml_destdir}/*/*.a %exclude %{ocaml_destdir}/*/*.cmxa %exclude %{ocaml_destdir}/*/*.cmx %exclude %{ocaml_destdir}/*/*.o %endif %exclude %{ocaml_destdir}/*/*.mli %{_defaultdocdir}/%{name}-%{version}/LICENSE %files devel %if %opt %{ocaml_destdir}/*/*.a %{ocaml_destdir}/*/*.cmxa %{ocaml_destdir}/*/*.cmx %{ocaml_destdir}/*/*.o %endif %{ocaml_destdir}/*/*.mli # Include all code and examples in the doc directory %{_defaultdocdir}/%{name}-%{version}-devel/ %changelog * Mon Jul 11 2011 Jerry James - 1.7-1 - New upstream release - Drop unnecessary spec file elements (BuildRoot, etc.) - Drop dependency generation workaround for Fedora 12 and earlier - Remove spurious executable bits on source files - Replace the definition of __ocaml_requires_opts to "-i Sig", which removes the legitimate Requires: ocaml(GtkSignal), with __requires_exclude. * Tue Feb 08 2011 Fedora Release Engineering - 1.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Fri Jan 21 2011 Richard W.M. Jones - 1.6-2 - Ignore ocaml(Sig) symbol. * Mon Jan 10 2011 Richard W.M. Jones - 1.6-1 - New upstream version 1.6. - Rebuild for OCaml 3.12. - Remove obsolete patches and add patch to fix install-findlib rule. * Wed Feb 10 2010 Alan Dunn - 1.3-3 - Include files (including .cmo files) and install more files that are needed by other applications (eg: Frama-C) that depend on ocaml-ocamlgraph - define -> global - Update for new dependency generator in F13 * Wed Dec 30 2009 Richard W.M. Jones - 1.3-2 - Rebuild for OCaml 3.11.2. * Thu Oct 8 2009 Richard W.M. Jones - 1.3-1 - New upstream release 1.3. - A slightly different viewGraph-related patch is required for this release. * Fri Aug 07 2009 Alan Dunn - 1.1-1 - New upstream release 1.1. - Makefile patch updated (still not incorporated upstream). * Sat Jul 25 2009 Fedora Release Engineering - 1.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Sat May 23 2009 Richard W.M. Jones - 1.0-5 - Rebuild for OCaml 3.11.1 * Thu Apr 16 2009 S390x secondary arch maintainer - ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs (added sparc64 per request from the sparc maintainer) * Wed Feb 25 2009 Fedora Release Engineering - 1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Fri Dec 5 2008 Richard W.M. Jones - 1.0-3 - Rebuild for OCaml 3.11.0. - Requires lablgtk2. - Pull in gtk / libgnomecanvas too. * Thu Nov 20 2008 Richard W.M. Jones - 1.0-1 - New upstream release 1.0. - Patch0 removed - now upstream. - Added a patch to fix documentation problem. - Run tests with 'make --no-print-directory'. * Wed Aug 13 2008 Alan Dunn 0.99c-2 - Incorporates changes suggested during review: - License information was incorrect - rpmlint error now properly justified * Thu Aug 07 2008 Alan Dunn 0.99c-1 - Initial Fedora RPM release.