]>
Commit | Line | Data |
---|---|---|
0184dd13 JR |
1 | # |
2 | # Conditional build: | |
0deef04c | 3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) |
0184dd13 | 4 | |
0deef04c JB |
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 | |
0184dd13 JR |
7 | %undefine with_ocaml_opt |
8 | %endif | |
9 | ||
b4147ee2 JR |
10 | %define _enable_debug_packages 0 |
11 | ||
2f3e206b | 12 | Summary: OCaml library for arc and node graphs |
0deef04c | 13 | Summary(pl.UTF-8): Biblioteka OCamla do grafów z wierzchołków i krawędzi |
2f3e206b | 14 | Name: ocaml-graph |
b4147ee2 | 15 | Version: 1.8.8 |
0deef04c JB |
16 | Release: 2 |
17 | License: LGPL v2 with exceptions | |
2f3e206b JR |
18 | Group: Libraries |
19 | Source0: http://ocamlgraph.lri.fr/download/ocamlgraph-%{version}.tar.gz | |
b4147ee2 | 20 | # Source0-md5: 9d71ca69271055bd22d0dfe4e939831a |
2f3e206b JR |
21 | URL: http://ocamlgraph.lri.fr/ |
22 | BuildRequires: libart_lgpl-devel | |
0deef04c | 23 | BuildRequires: ocaml >= 3.10.0 |
2f3e206b JR |
24 | BuildRequires: ocaml-findlib-devel |
25 | BuildRequires: ocaml-lablgtk2-devel | |
0deef04c | 26 | BuildRequires: ocaml-lablgtk2-gnome-devel |
2f3e206b JR |
27 | %requires_eq ocaml-runtime |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
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 | |
b4147ee2 JR |
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. | |
2f3e206b | 39 | |
0deef04c JB |
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 | |
50 | wizualizacji grafów). | |
51 | ||
2f3e206b JR |
52 | %package devel |
53 | Summary: OCaml library for arc and node graphs - development files | |
0deef04c | 54 | Summary(pl.UTF-8): Biblioteka OCamla do grafów łuków i węzłów - pliki programistyczne |
2f3e206b | 55 | Group: Development/Libraries |
73cfbe3e | 56 | Requires: %{name} = %{version}-%{release} |
b4147ee2 | 57 | %requires_eq ocaml |
2f3e206b JR |
58 | |
59 | %description devel | |
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 | |
b4147ee2 JR |
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. | |
2f3e206b JR |
68 | |
69 | This package contains files needed to develop OCaml programs using | |
70 | Ocamlgraph library. | |
71 | ||
0deef04c JB |
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 | |
82 | wizualizacji grafów). | |
83 | ||
84 | Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu | |
85 | używających biblioteki Ocamlgraph. | |
86 | ||
2f3e206b JR |
87 | %prep |
88 | %setup -q -n ocamlgraph-%{version} | |
89 | ||
90 | %build | |
91 | %configure | |
92 | ||
0184dd13 JR |
93 | %{__make} -j1 all %{?with_ocaml_opt:opt} \ |
94 | CC="%{__cc} %{rpmcflags} -fPIC" | |
2f3e206b JR |
95 | |
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
b4147ee2 | 98 | install -d $RPM_BUILD_ROOT{%{_libdir}/ocaml/ocamlgraph,%{_examplesdir}/%{name}-%{version}} |
2f3e206b | 99 | |
b4147ee2 JR |
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 | |
2f3e206b | 102 | |
2f3e206b JR |
103 | cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
104 | ||
2f3e206b JR |
105 | %clean |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
b4147ee2 | 108 | %files |
2f3e206b | 109 | %defattr(644,root,root,755) |
0deef04c | 110 | %doc CHANGES COPYING CREDITS FAQ LICENSE README.adoc |
2f3e206b | 111 | %dir %{_libdir}/ocaml/ocamlgraph |
b4147ee2 | 112 | %{_libdir}/ocaml/ocamlgraph/META |
0184dd13 | 113 | %{_libdir}/ocaml/ocamlgraph/*.cma |
b4147ee2 JR |
114 | %if %{with ocaml_opt} |
115 | %attr(755,root,root) %{_libdir}/ocaml/ocamlgraph/*.cmxs | |
116 | %endif | |
117 | ||
118 | %files devel | |
119 | %defattr(644,root,root,755) | |
0deef04c JB |
120 | %doc lib/*.mli src/*.mli |
121 | %{_libdir}/ocaml/ocamlgraph/*.cmi | |
2f82887e | 122 | %{_libdir}/ocaml/ocamlgraph/*.cmo |
0184dd13 | 123 | %if %{with ocaml_opt} |
0deef04c JB |
124 | %{_libdir}/ocaml/ocamlgraph/*.a |
125 | %{_libdir}/ocaml/ocamlgraph/*.cmx | |
0184dd13 JR |
126 | %{_libdir}/ocaml/ocamlgraph/*.cmxa |
127 | %endif | |
2f3e206b | 128 | %{_examplesdir}/%{name}-%{version} |