commit 3471597ba4b817e3791ff725c5674068630adccf
Author: Jakub Bogusz <[email protected]>
Date:   Mon Dec 20 21:19:26 2021 +0100

    - updated to 2.0.0
    - added no-stdlib-shims patch (avoid stdlib-shims dependency not required 
with current ocaml)
    - GTK part is separate ocaml package now, subpackaged

 ocaml-graph-no-stdlib-shims.patch | 41 ++++++++++++++++++
 ocaml-graph.spec                  | 91 ++++++++++++++++++++++++++++++++-------
 2 files changed, 117 insertions(+), 15 deletions(-)
---
diff --git a/ocaml-graph.spec b/ocaml-graph.spec
index 4a39e5c..673d9cf 100644
--- a/ocaml-graph.spec
+++ b/ocaml-graph.spec
@@ -12,15 +12,18 @@
 Summary:       OCaml library for arc and node graphs
 Summary(pl.UTF-8):     Biblioteka OCamla do grafów z wierzchołków i krawędzi
 Name:          ocaml-graph
-Version:       1.8.8
-Release:       2
-License:       LGPL v2 with exceptions
+Version:       2.0.0
+Release:       1
+License:       LGPL v2.1 with exceptions
 Group:         Libraries
-Source0:       http://ocamlgraph.lri.fr/download/ocamlgraph-%{version}.tar.gz
-# Source0-md5: 9d71ca69271055bd22d0dfe4e939831a
+#Source0Download: https://github.com/backtracking/ocamlgraph/releases
+Source0:       
https://github.com/backtracking/ocamlgraph/releases/download/%{version}/ocamlgraph-%{version}.tbz
+# Source0-md5: 2d07fcf3501e1d4997c03fa94cea22f0
+Patch0:                %{name}-no-stdlib-shims.patch
 URL:           http://ocamlgraph.lri.fr/
 BuildRequires: libart_lgpl-devel
 BuildRequires: ocaml >= 3.10.0
+BuildRequires: ocaml-dune >= 2.0
 BuildRequires: ocaml-findlib-devel
 BuildRequires: ocaml-lablgtk2-devel
 BuildRequires: ocaml-lablgtk2-gnome-devel
@@ -84,30 +87,62 @@ wizualizacji grafów).
 Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
 używających biblioteki Ocamlgraph.
 
+%package gtk
+Summary:       Displaying graphs using OCamlGraph and GTK
+Summary(pl.UTF-8):     Wyświetlanie grafów przy użyciu bibliotek OCamlGraph i 
GTK
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description gtk
+Displaying graphs using OCamlGraph and GTK.
+
+%description gtk -l pl.UTF-8
+Wyświetlanie grafów przy użyciu bibliotek OCamlGraph i GTK.
+
+%package gtk-devel
+Summary:       Displaying graphs using OCamlGraph and GTK - development files
+Summary(pl.UTF-8):     Wyświetlanie grafów przy użyciu bibliotek OCamlGraph i 
GTK - pliki programistyczne
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description gtk-devel
+Displaying graphs using OCamlGraph and GTK.
+
+This package contains files needed to develop OCaml programs using
+Ocamlgraph GTK library.
+
+%description gtk-devel -l pl.UTF-8
+Wyświetlanie grafów przy użyciu bibliotek OCamlGraph i GTK.
+
+Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
+używających biblioteki Ocamlgraph GTK.
+
 %prep
 %setup -q -n ocamlgraph-%{version}
+%patch0 -p1
 
 %build
-%configure
-
-%{__make} -j1 all %{?with_ocaml_opt:opt} \
-       CC="%{__cc} %{rpmcflags} -fPIC"
+dune build --verbose
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d 
$RPM_BUILD_ROOT{%{_libdir}/ocaml/ocamlgraph,%{_examplesdir}/%{name}-%{version}}
 
-cp -p *.cm[ixao]* %{?with_ocaml_opt:*.a} 
$RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlgraph
-cp -p META $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlgraph
+dune install --destdir=$RPM_BUILD_ROOT
 
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
+# sources
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/{ocamlgraph,ocamlgraph_gtk}/*.ml
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/{ocamlgraph,ocamlgraph_gtk}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES COPYING CREDITS FAQ LICENSE README.adoc
+%doc CHANGES.md COPYING CREDITS FAQ LICENSE README.md TODO.md
 %dir %{_libdir}/ocaml/ocamlgraph
 %{_libdir}/ocaml/ocamlgraph/META
 %{_libdir}/ocaml/ocamlgraph/*.cma
@@ -117,12 +152,38 @@ rm -rf $RPM_BUILD_ROOT
 
 %files devel
 %defattr(644,root,root,755)
-%doc lib/*.mli src/*.mli
 %{_libdir}/ocaml/ocamlgraph/*.cmi
-%{_libdir}/ocaml/ocamlgraph/*.cmo
+%{_libdir}/ocaml/ocamlgraph/*.cmt
+%{_libdir}/ocaml/ocamlgraph/*.cmti
+%{_libdir}/ocaml/ocamlgraph/*.mli
 %if %{with ocaml_opt}
 %{_libdir}/ocaml/ocamlgraph/*.a
 %{_libdir}/ocaml/ocamlgraph/*.cmx
 %{_libdir}/ocaml/ocamlgraph/*.cmxa
 %endif
+%{_libdir}/ocaml/ocamlgraph/dune-package
+%{_libdir}/ocaml/ocamlgraph/opam
 %{_examplesdir}/%{name}-%{version}
+
+%files gtk
+%defattr(644,root,root,755)
+%dir %{_libdir}/ocaml/ocamlgraph_gtk
+%{_libdir}/ocaml/ocamlgraph_gtk/META
+%{_libdir}/ocaml/ocamlgraph_gtk/*.cma
+%if %{with ocaml_opt}
+%attr(755,root,root) %{_libdir}/ocaml/ocamlgraph_gtk/*.cmxs
+%endif
+
+%files gtk-devel
+%defattr(644,root,root,755)
+%{_libdir}/ocaml/ocamlgraph_gtk/*.cmi
+%{_libdir}/ocaml/ocamlgraph_gtk/*.cmt
+%{_libdir}/ocaml/ocamlgraph_gtk/*.cmti
+%{_libdir}/ocaml/ocamlgraph_gtk/*.mli
+%if %{with ocaml_opt}
+%{_libdir}/ocaml/ocamlgraph_gtk/*.a
+%{_libdir}/ocaml/ocamlgraph_gtk/*.cmx
+%{_libdir}/ocaml/ocamlgraph_gtk/*.cmxa
+%endif
+%{_libdir}/ocaml/ocamlgraph_gtk/dune-package
+%{_libdir}/ocaml/ocamlgraph_gtk/opam
diff --git a/ocaml-graph-no-stdlib-shims.patch 
b/ocaml-graph-no-stdlib-shims.patch
new file mode 100644
index 0000000..9b32318
--- /dev/null
+++ b/ocaml-graph-no-stdlib-shims.patch
@@ -0,0 +1,41 @@
+--- ocamlgraph-2.0.0/ocamlgraph_gtk.opam.orig  2020-10-02 15:47:57.000000000 
+0200
++++ ocamlgraph-2.0.0/ocamlgraph_gtk.opam       2021-12-20 20:47:27.574013548 
+0100
+@@ -19,7 +19,6 @@ homepage: "https://github.com/backtracki
+ bug-reports: "https://github.com/backtracking/ocamlgraph/issues/new";
+ depends: [
+   "ocaml"
+-  "stdlib-shims"
+   "lablgtk"
+   "conf-gnomecanvas"
+   "ocamlgraph"
+--- ocamlgraph-2.0.0/ocamlgraph.opam.orig      2020-10-02 15:47:57.000000000 
+0200
++++ ocamlgraph-2.0.0/ocamlgraph.opam   2021-12-20 20:47:53.010542413 +0100
+@@ -19,7 +19,6 @@ homepage: "https://github.com/backtracki
+ bug-reports: "https://github.com/backtracking/ocamlgraph/issues/new";
+ depends: [
+   "ocaml"
+-  "stdlib-shims"
+   "dune" {>= "2.0"}
+ ]
+ build: [
+--- ocamlgraph-2.0.0/dgraph/dune.orig  2020-10-02 15:47:57.000000000 +0200
++++ ocamlgraph-2.0.0/dgraph/dune       2021-12-20 20:50:39.002976488 +0100
+@@ -2,7 +2,7 @@
+  (name graph_gtk)
+  (public_name ocamlgraph_gtk)
+  (modules :standard \ dGraphViewer)
+- (libraries ocamlgraph stdlib-shims lablgtk2.gnomecanvas lablgtk2)
++ (libraries ocamlgraph lablgtk2.gnomecanvas lablgtk2)
+  (flags -open Graph))
+ 
+ (executable
+--- ocamlgraph-2.0.0/src/dune.orig     2020-10-02 15:47:57.000000000 +0200
++++ ocamlgraph-2.0.0/src/dune  2021-12-20 20:55:21.191447742 +0100
+@@ -3,7 +3,6 @@
+ (library
+  (name graph)
+  (public_name ocamlgraph)
+- (libraries stdlib-shims)
+  (modules_without_implementation dot_ast sig sig_pack))
+ 
+ (ocamlyacc dot_parser)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ocaml-graph.git/commitdiff/3471597ba4b817e3791ff725c5674068630adccf

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to