]> git.pld-linux.org Git - packages/ocaml-graph.git/blob - ocaml-graph.spec
3f11685e06ee762e8d4c2ac0aa90faa2a8e0eadc
[packages/ocaml-graph.git] / ocaml-graph.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # skip building native optimized binaries (bytecode is always built)
4
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
8 %endif
9
10 %define         _enable_debug_packages  0
11
12 Summary:        OCaml library for arc and node graphs
13 Name:           ocaml-graph
14 Version:        1.8.8
15 Release:        1
16 License:        LGPLv2 with exceptions
17 Group:          Libraries
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)
27
28 %description
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.
37
38 %package devel
39 Summary:        OCaml library for arc and node graphs - development files
40 Group:          Development/Libraries
41 Requires:       %{name} = %{version}-%{release}
42 %requires_eq ocaml
43
44 %description devel
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.
53
54 This package contains files needed to develop OCaml programs using
55 Ocamlgraph library.
56
57 %prep
58 %setup -q -n ocamlgraph-%{version}
59
60 %build
61 %configure
62
63 %{__make} -j1 all %{?with_ocaml_opt:opt} \
64         CC="%{__cc} %{rpmcflags} -fPIC"
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT{%{_libdir}/ocaml/ocamlgraph,%{_examplesdir}/%{name}-%{version}}
69
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
72
73 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %files
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
84 %if %{with ocaml_opt}
85 %attr(755,root,root) %{_libdir}/ocaml/ocamlgraph/*.cmxs
86 %endif
87
88 %files devel
89 %defattr(644,root,root,755)
90 %doc LICENSE lib/*.mli src/*.mli
91 %{_libdir}/ocaml/ocamlgraph/*.cmo
92 %{_libdir}/ocaml/ocamlgraph/*.cm[ix]
93 %if %{with ocaml_opt}
94 %{_libdir}/ocaml/ocamlgraph/*.[ao]
95 %{_libdir}/ocaml/ocamlgraph/*.cmxa
96 %endif
97 %{_examplesdir}/%{name}-%{version}
This page took 0.055758 seconds and 2 git commands to generate.