3 %bcond_without ocaml_opt # native optimized binaries (bytecode is always built)
5 # not yet available on x32 (ocaml 4.02.1), update 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
13 Summary(pl.UTF-8): Biblioteka OCamla do grafów z wierzchołków i krawędzi
17 License: LGPL v2 with exceptions
19 Source0: http://ocamlgraph.lri.fr/download/ocamlgraph-%{version}.tar.gz
20 # Source0-md5: 9d71ca69271055bd22d0dfe4e939831a
21 URL: http://ocamlgraph.lri.fr/
22 BuildRequires: libart_lgpl-devel
23 BuildRequires: ocaml >= 3.10.0
24 BuildRequires: ocaml-findlib-devel
25 BuildRequires: ocaml-lablgtk2-devel
26 BuildRequires: ocaml-lablgtk2-gnome-devel
27 %requires_eq ocaml-runtime
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Ocamlgraph provides several different implementations of graph data
32 structures. It also provides implementations for a number of classical
33 graph algorithms like Kruskal's algorithm for MSTs, topological
34 ordering of DAGs, Dijkstra's shortest paths algorithm, and
35 Ford-Fulkerson's maximal-flow algorithm to name a few. The algorithms
36 and data structures are written functorially for maximal reusability.
37 Also has input and output capability for Graph Modeling Language file
38 format and Dot and Neato graphviz (graph visualization) tools.
40 %description -l pl.UTF-8
41 Ocamlgraph udostępnia kilka różnych implementacji struktur danych
42 grafów. Zawiera także implementacje wielu klasycznych algorytmów
43 grafowych, m.in. algorytm Kruskala wyznaczania drzewa rozpinającego,
44 sortowania topologicznego skierowanych grafów acyklicznych, algorytm
45 najkrótszej ścieżki Dijkstry, algorytm maksymalnego przepływu
46 Forda-Fulkersona. Algorytmy i struktury danych zostały napisane w
47 oparciu o funktory w celu zwiększenia możliwości zastosowań. Możliwe
48 jest także wejście i wyjście w postaci formatu plików Graph Modeling
49 Language oraz narzędzi Dot i Neato z projektu graphviz (służącego do
53 Summary: OCaml library for arc and node graphs - development files
54 Summary(pl.UTF-8): Biblioteka OCamla do grafów łuków i węzłów - pliki programistyczne
55 Group: Development/Libraries
56 Requires: %{name} = %{version}-%{release}
60 Ocamlgraph provides several different implementations of graph data
61 structures. It also provides implementations for a number of classical
62 graph algorithms like Kruskal's algorithm for MSTs, topological
63 ordering of DAGs, Dijkstra's shortest paths algorithm, and
64 Ford-Fulkerson's maximal-flow algorithm to name a few. The algorithms
65 and data structures are written functorially for maximal reusability.
66 Also has input and output capability for Graph Modeling Language file
67 format and Dot and Neato graphviz (graph visualization) tools.
69 This package contains files needed to develop OCaml programs using
72 %description devel -l pl.UTF-8
73 Ocamlgraph udostępnia kilka różnych implementacji struktur danych
74 grafów. Zawiera także implementacje wielu klasycznych algorytmów
75 grafowych, m.in. algorytm Kruskala wyznaczania drzewa rozpinającego,
76 sortowania topologicznego skierowanych grafów acyklicznych, algorytm
77 najkrótszej ścieżki Dijkstry, algorytm maksymalnego przepływu
78 Forda-Fulkersona. Algorytmy i struktury danych zostały napisane w
79 oparciu o funktory w celu zwiększenia możliwości zastosowań. Możliwe
80 jest także wejście i wyjście w postaci formatu plików Graph Modeling
81 Language oraz narzędzi Dot i Neato z projektu graphviz (służącego do
84 Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
85 używających biblioteki Ocamlgraph.
88 %setup -q -n ocamlgraph-%{version}
93 %{__make} -j1 all %{?with_ocaml_opt:opt} \
94 CC="%{__cc} %{rpmcflags} -fPIC"
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT{%{_libdir}/ocaml/ocamlgraph,%{_examplesdir}/%{name}-%{version}}
100 cp -p *.cm[ixao]* %{?with_ocaml_opt:*.a} $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlgraph
101 cp -p META $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlgraph
103 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
106 rm -rf $RPM_BUILD_ROOT
109 %defattr(644,root,root,755)
110 %doc CHANGES COPYING CREDITS FAQ LICENSE README.adoc
111 %dir %{_libdir}/ocaml/ocamlgraph
112 %{_libdir}/ocaml/ocamlgraph/META
113 %{_libdir}/ocaml/ocamlgraph/*.cma
114 %if %{with ocaml_opt}
115 %attr(755,root,root) %{_libdir}/ocaml/ocamlgraph/*.cmxs
119 %defattr(644,root,root,755)
120 %doc lib/*.mli src/*.mli
121 %{_libdir}/ocaml/ocamlgraph/*.cmi
122 %{_libdir}/ocaml/ocamlgraph/*.cmo
123 %if %{with ocaml_opt}
124 %{_libdir}/ocaml/ocamlgraph/*.a
125 %{_libdir}/ocaml/ocamlgraph/*.cmx
126 %{_libdir}/ocaml/ocamlgraph/*.cmxa
128 %{_examplesdir}/%{name}-%{version}