Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > 4810baa335b4d0e5766570dbf8d843bd > files > 1

ocaml-ocamlgraph-2.0.0-4.mga9.src.rpm

%define debug_package %{nil}
%global srcname ocamlgraph

Name:           ocaml-ocamlgraph
Version:        2.0.0
Release:        %mkrel 4
Summary:        OCaml library for arc and node graphs

Group:          Development/OCaml
License:        LGPLv2 with exceptions

URL:            https://backtracking.github.io/ocamlgraph/
Source0:        https://github.com/backtracking/ocamlgraph/releases/download/%{version}/%{srcname}-%{version}.tbz
Source1:        ocamlgraph-test.result

BuildRequires:  ocaml-compiler
BuildRequires:  ocaml-dune >= 2.0
BuildRequires:  ocaml-graphics-devel
BuildRequires:  ocaml-lablgtk2-devel
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  ocaml-odoc
BuildRequires:  pkgconfig(libgnomecanvas-2.0)

%global __ocaml_requires_opts -i 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}
Requires:       %{name} = %{EVRD}

%description    devel
The %{name}-devel package contains libraries and signature files
for developing applications that use %{name}.

%package        gtk
Summary:        Display graphs using OCamlGraph and GTK2
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    gtk
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.

%package        gtk-devel
Summary:        Development files for %{name}-gtk
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
Requires:       %{name}-gtk%{?_isa} = %{version}-%{release}
Requires:       ocaml-lablgtk2-devel%{?_isa}
Requires:       pkgconfig(libgnomecanvas-2.0)

%description    gtk-devel
The %{name}-gtk-devel package contains libraries and signature
files for developing applications that use %{name}-gtk.

%package        tools
Summary:        Graph editing tools for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    tools
The %{name}-tools package contains graph editing tools for use with
%{name}.

%prep
%autosetup -n %{srcname}-%{version}

# The stdlib-shims package adapts older OCaml versions to recent changes in
# the OCaml standard library.  We have a new enough OCaml version.
sed -i 's/ stdlib-shims//' dgraph/dune
sed -i '/stdlib-shims/d' *.opam src/dune
 

%build
dune build %{?_smp_mflags} --display=verbose
dune build %{?_smp_mflags} @doc

%install
dune install --destdir=%{buildroot}

# We do not want the dune markers
find _build/default/_doc/_html -name .dune-keep -delete

# We do not want the ml files
find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete

# We install the documentation with the doc macro
rm -fr %{buildroot}%{_prefix}/doc

# Install the graph editing tools
mkdir -p %{buildroot}%{_bindir}

install -m 0755 -p _build/default/editor/editor.exe \
        %{buildroot}/%{_bindir}/ocamlgraph-editor
install -m 0755 -p _build/default/editor/ed_main.exe \
        %{buildroot}/%{_bindir}/ocamlgraph-ed_main
install -m 0755 -p _build/default/editor/graphEdGTK.exe \
        %{buildroot}/%{_bindir}/graphEdGTK
install -m 0755 -p _build/default/dgraph/dGraphViewer.exe \
        %{buildroot}%{_bindir}/dGraphViewer
install -m 0755 -p _build/default/view_graph/viewGraph_test.exe \
        %{buildroot}%{_bindir}/ocamlgraph-viewgraph

%check
dune runtest

%files
%doc CREDITS FAQ
%license COPYING LICENSE
%dir %{_libdir}/ocaml/%{srcname}/
%{_libdir}/ocaml/%{srcname}/META
%{_libdir}/ocaml/%{srcname}/*.cma
%{_libdir}/ocaml/%{srcname}/*.cmi
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{srcname}/*.cmxs
%endif
 
%files devel
%doc _build/default/_doc/_html/* examples CHANGES.md README.md
%doc tests/
%doc _build/default/_doc/_html/* examples CHANGES.md README.md
%{_libdir}/ocaml/%{srcname}/dune-package
%{_libdir}/ocaml/%{srcname}/opam
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{srcname}/*.a
%{_libdir}/ocaml/%{srcname}/*.cmx
%{_libdir}/ocaml/%{srcname}/*.cmxa
%endif
%{_libdir}/ocaml/%{srcname}/*.cmt
%{_libdir}/ocaml/%{srcname}/*.cmti
%{_libdir}/ocaml/%{srcname}/*.mli

%files gtk
%dir %{_libdir}/ocaml/%{srcname}_gtk/
%{_libdir}/ocaml/%{srcname}_gtk/META
%{_libdir}/ocaml/%{srcname}_gtk/*.cma
%{_libdir}/ocaml/%{srcname}_gtk/*.cmi
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{srcname}_gtk/*.cmxs
%endif

%files gtk-devel
%{_libdir}/ocaml/%{srcname}_gtk/dune-package
%{_libdir}/ocaml/%{srcname}_gtk/opam
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{srcname}_gtk/*.a
%{_libdir}/ocaml/%{srcname}_gtk/*.cmx
%{_libdir}/ocaml/%{srcname}_gtk/*.cmxa
%endif
%{_libdir}/ocaml/%{srcname}_gtk/*.cmt
%{_libdir}/ocaml/%{srcname}_gtk/*.cmti
%{_libdir}/ocaml/%{srcname}_gtk/*.mli

%files tools
%{_bindir}/*


%changelog
* Fri Oct 21 2022 pterjan <pterjan> 2.0.0-4.mga9
+ Revision: 1898267
- Rebuild for new ocaml-lablgtk2

* Sat May 21 2022 pterjan <pterjan> 2.0.0-3.mga9
+ Revision: 1859623
- Rebuild for OCaml 4.14

* Sat Oct 16 2021 tv <tv> 2.0.0-2.mga9
+ Revision: 1751788
- Fix gtk-devel deps

* Fri Oct 15 2021 tv <tv> 2.0.0-1.mga9
+ Revision: 1751654
- 2.0.0
- New URLs
- split subpkgs

* Wed Oct 13 2021 tv <tv> 1.8.8-9.mga9
+ Revision: 1750914
- Rebuild for ocaml 4.13.1

* Wed Mar 03 2021 tv <tv> 1.8.8-8.mga9
+ Revision: 1697311
- rebuild for ocaml-4.2-12

* Sun Jan 10 2021 pterjan <pterjan> 1.8.8-7.mga8
+ Revision: 1670470
- Rebuild to generate ocamlx provides

* Fri Feb 28 2020 umeabot <umeabot> 1.8.8-6.mga8
+ Revision: 1551363
- Rebuild for ocaml 4.10.0 final

* Wed Feb 19 2020 umeabot <umeabot> 1.8.8-5.mga8
+ Revision: 1544196
- Mageia 8 Mass Rebuild

* Fri Jan 24 2020 tv <tv> 1.8.8-4.mga8
+ Revision: 1482696
- rebuild for ocaml-4.10
+ wally <wally>
- replace deprecated %%configure2_5x

* Wed Oct 24 2018 pterjan <pterjan> 1.8.8-3.mga7
+ Revision: 1325035
- Rebuild for ocaml 4.07.1

* Sun Sep 23 2018 umeabot <umeabot> 1.8.8-2.mga7
+ Revision: 1299906
- Mageia 7 Mass Rebuild

* Sun Nov 26 2017 tv <tv> 1.8.8-1.mga7
+ Revision: 1179359
- new release
- rebuild for new ocaml

* Fri Oct 13 2017 daviddavid <daviddavid> 1.8.6-3.mga7
+ Revision: 1171507
- rebuild for fixed ocaml (use standard ISO C99 types {u}uint{32,64}_t)
- package the graph editing tools
- reenable debug package

* Mon Sep 26 2016 pterjan <pterjan> 1.8.6-2.mga6
+ Revision: 1056425
- Rebuild for fix in ocaml

* Mon Feb 01 2016 pterjan <pterjan> 1.8.6-1.mga6
+ Revision: 930821
- Update test output
- Update to 1.8.6

* Wed Oct 21 2015 tv <tv> 1.8.5-5.mga6
+ Revision: 893238
- rebuild with fixed deps

* Wed Oct 15 2014 umeabot <umeabot> 1.8.5-4.mga5
+ Revision: 750943
- Second Mageia 5 Mass Rebuild

* Wed Sep 24 2014 malo <malo> 1.8.5-3.mga5
+ Revision: 724303
- fix auto requires

* Tue Sep 16 2014 umeabot <umeabot> 1.8.5-2.mga5
+ Revision: 683074
- Mageia 5 Mass Rebuild

* Wed Sep 03 2014 malo <malo> 1.8.5-1.mga5
+ Revision: 671345
- update to 1.8.5 (patch upstreamed)

* Sat Oct 19 2013 umeabot <umeabot> 1.8.3-3.mga4
+ Revision: 534961
- Mageia 4 Mass Rebuild
+ blue_prawn <blue_prawn>
- added scm link in comment

* Mon Sep 16 2013 malo <malo> 1.8.3-2.mga4
+ Revision: 480314
- rebuild for new ocaml

* Sun Jun 09 2013 malo <malo> 1.8.3-1.mga4
+ Revision: 441348
- update to 1.8.3

* Sun Jan 13 2013 umeabot <umeabot> 1.8.2-3.mga3
+ Revision: 361509
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Tue Dec 04 2012 malo <malo> 1.8.2-2.mga3
+ Revision: 326526
- rebuild for new ocaml

* Tue Oct 02 2012 blue_prawn <blue_prawn> 1.8.2-1.mga3
+ Revision: 302170
- rebuild last version 1.8.2
- updated to last version 1.8.2

* Tue Oct 02 2012 blue_prawn <blue_prawn> 1.8.1-2.mga3
+ Revision: 302164
- rebuild for new ocaml 4.00
- new rpm group for ocaml
- allow successive builds with rpmbuild

* Thu Nov 17 2011 malo <malo> 1.8.1-1.mga2
+ Revision: 168392
- missing BuildRequires libgnomecanvas2-devel
- new version 1.8.1
- rediff installation patch

* Sun Oct 02 2011 fwang <fwang> 1.7-2.mga2
+ Revision: 150926
- rebuild for new ocaml

* Fri Apr 08 2011 ennael <ennael> 1.7-1.mga1
+ Revision: 82453
- fix release
- ibuild requires switched to gtk2
- clean spec file
- imported package ocaml-ocamlgraph