3 %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
5 # not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
6 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
7 %undefine with_ocaml_opt
10 %define _enable_debug_packages 0
12 Summary: OCaml library for arc and node graphs
16 License: LGPLv2 with exceptions
18 Source0: http://ocamlgraph.lri.fr/download/ocamlgraph-%{version}.tar.gz
19 # Source0-md5: 9d71ca69271055bd22d0dfe4e939831a
20 URL: http://ocamlgraph.lri.fr/
21 BuildRequires: libart_lgpl-devel
22 BuildRequires: ocaml >= 3.04-7
23 BuildRequires: ocaml-findlib-devel
24 BuildRequires: ocaml-lablgtk2-devel
25 %requires_eq ocaml-runtime
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Ocamlgraph provides several different implementations of graph data
30 structures. It also provides implementations for a number of classical
31 graph algorithms like Kruskal's algorithm for MSTs, topological
32 ordering of DAGs, Dijkstra's shortest paths algorithm, and
33 Ford-Fulkerson's maximal-flow algorithm to name a few. The algorithms
34 and data structures are written functorially for maximal reusability.
35 Also has input and output capability for Graph Modeling Language file
36 format and Dot and Neato graphviz (graph visualization) tools.
39 Summary: OCaml library for arc and node graphs - development files
40 Group: Development/Libraries
41 Requires: %{name} = %{version}-%{release}
45 Ocamlgraph provides several different implementations of graph data
46 structures. It also provides implementations for a number of classical
47 graph algorithms like Kruskal's algorithm for MSTs, topological
48 ordering of DAGs, Dijkstra's shortest paths algorithm, and
49 Ford-Fulkerson's maximal-flow algorithm to name a few. The algorithms
50 and data structures are written functorially for maximal reusability.
51 Also has input and output capability for Graph Modeling Language file
52 format and Dot and Neato graphviz (graph visualization) tools.
54 This package contains files needed to develop OCaml programs using
58 %setup -q -n ocamlgraph-%{version}
63 %{__make} -j1 all %{?with_ocaml_opt:opt} \
64 CC="%{__cc} %{rpmcflags} -fPIC"
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT{%{_libdir}/ocaml/ocamlgraph,%{_examplesdir}/%{name}-%{version}}
70 cp -p *.cm[ixao]* %{?with_ocaml_opt:*.a} $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlgraph
71 cp -p META $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlgraph
73 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
76 rm -rf $RPM_BUILD_ROOT
79 %defattr(644,root,root,755)
80 %doc CHANGES CREDITS FAQ
81 %dir %{_libdir}/ocaml/ocamlgraph
82 %{_libdir}/ocaml/ocamlgraph/META
83 %{_libdir}/ocaml/ocamlgraph/*.cma
85 %attr(755,root,root) %{_libdir}/ocaml/ocamlgraph/*.cmxs
89 %defattr(644,root,root,755)
90 %doc LICENSE lib/*.mli src/*.mli
91 %{_libdir}/ocaml/ocamlgraph/*.cmo
92 %{_libdir}/ocaml/ocamlgraph/*.cm[ix]
94 %{_libdir}/ocaml/ocamlgraph/*.[ao]
95 %{_libdir}/ocaml/ocamlgraph/*.cmxa
97 %{_examplesdir}/%{name}-%{version}