Stéphane Glondu wrote: > Package: libocamlgraph-ocaml-dev > Version: 1.3+debian-1+b1 > Severity: important > > Hello, > > Installing libocamlgraph-ocaml-dev drags hundreds of MB of > dependencies because of the dependency on liblablgtk2-ocaml-dev, > whereas the core library itself (graph.cma) is 2 MB and doesn't need > it. Please put GTK-dependent stuff in a separate binary package. >
Attached a patch that fixes the problem encountred by Stéphane. I'm not sure about the name I've picked for the new binary package (namely libocamlgraph-viewer-ocaml-dev). If you have some ideas or any opinion, please let me know. I'll wait a couple of days for comments and then upload it. -- Mehdi Dogguy مهدي الدڤي http://dogguy.org/
commit 2b047c44d86988563b0423b715128aa3fd5491f8 Author: Mehdi Dogguy <[email protected]> Date: Sun Mar 7 21:42:24 2010 +0100 Provide new binary packages to avoid unnecessary dependencies: - libocamlgraph-view-ocaml-dev - libocamlgraph-ocaml-doc diff --git a/debian/changelog b/debian/changelog index 9081fcd..7776d99 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +ocamlgraph (1.3+debian-2) unstable; urgency=low + + * Provide a new binary package to avoid installing gnome and gtk + libraries when you only need to manipulate Graphs (Closes: #572893) + - libocamlgraph-view-ocaml-dev + * Put the generated documentation in a new binary (arch:all) package. + - libocamlgraph-ocaml-doc + + -- Mehdi Dogguy <[email protected]> Sun, 07 Mar 2010 21:40:23 +0100 + ocamlgraph (1.3+debian-1) unstable; urgency=low * New upstream release diff --git a/debian/control b/debian/control index f9c07f4..a827168 100644 --- a/debian/control +++ b/debian/control @@ -31,7 +31,6 @@ Depends: ${misc:Depends} Provides: ${ocaml:Provides} -Suggests: graphviz | springgraph Description: graph library for OCaml Ocamlgraph is a graph library for OCaml. Its contribution is three-fold: @@ -60,6 +59,58 @@ Description: graph library for OCaml a few operations such as iterating over all vertices, over the successors of a vertex, etc. +Package: libocamlgraph-viewer-ocaml-dev +Architecture: any +Section: ocaml +Depends: + ${ocaml:Depends}, + ${shlibs:Depends}, + ${misc:Depends} +Provides: + ${ocaml:Provides} +Suggests: graphviz | springgraph +Description: graph library for OCaml + Ocamlgraph is a graph library for OCaml. Its contribution is + three-fold: + . + * It provides an easy-to-use graph data structure together with + several operations and algorithms over graphs. It is a + reasonably efficient imperative data structure for directed + graphs with vertices and edges labeled with integers. + . + * Then ocamlgraph provides several other graph implementations + for those not satisfied with the one above. Some are + persistent (imutable) and other imperative (mutable). Some + are directed and other are not. Some have labels for + vertices, or labels for edges, or both. Some have abstract + types for vertices. etc. + These implementations are written as functors: you give the + types of vertices labels, edge labels, etc. and you get the + data structure as a result. + . + * Finally, ocamlgraph provides several classic operations and + algorithms over graphs. + They are also written as functors i.e. independently of the + data structure for graphs. One consequence is that you can + define your own data structure for graphs and yet re-use all + the algorithms from this library -- you only need to provide + a few operations such as iterating over all vertices, over + the successors of a vertex, etc. + . + This package provides viewgraph and dgraph library to build graph + viewers. + +Package: libocamlgraph-ocaml-doc +Architecture: all +Section: doc +Depends: + ${ocaml:Depends}, + ${shlibs:Depends}, + ${misc:Depends} +Description: Documentation for the OCamlgraph library + This package provides the API reference documentation generated by + ocamldoc. + Package: ocamlgraph-editor Architecture: any Section: graphics diff --git a/debian/libocamlgraph-ocaml-dev.ocamldoc b/debian/libocamlgraph-ocaml-dev.ocamldoc deleted file mode 100644 index e1026b8..0000000 --- a/debian/libocamlgraph-ocaml-dev.ocamldoc +++ /dev/null @@ -1 +0,0 @@ --I src -I dgraph -I view_graph -I +lablgtk2 diff --git a/debian/libocamlgraph-ocaml-doc.ocamldoc b/debian/libocamlgraph-ocaml-doc.ocamldoc new file mode 100644 index 0000000..46c0bbf --- /dev/null +++ b/debian/libocamlgraph-ocaml-doc.ocamldoc @@ -0,0 +1,2 @@ +-I src -I dgraph -I view_graph -I +lablgtk2 +--include debian/libocamlgraph-ocaml-dev diff --git a/debian/rules b/debian/rules index 565b654..dac8c40 100755 --- a/debian/rules +++ b/debian/rules @@ -24,12 +24,25 @@ include /usr/share/cdbs/1/rules/dpatch.mk include $(CURDIR)/debian/mk/docbook-manpage.mk DEV_PKG = libocamlgraph-ocaml-dev +VIW_PKG = libocamlgraph-viewer-ocaml-dev DEB_MAKE_CLEAN_TARGET = distclean DEB_MAKE_BUILD_TARGET = all DEB_MAKE_INSTALL_TARGET = install \ BINDIR="$(CURDIR)/debian/ocamlgraph-editor/usr/bin" \ INSTALL_LIBDIR="$(CURDIR)/debian/$(DEV_PKG)/$(OCAML_STDLIB_DIR)/ocamlgraph/" +OCAML_DHOCAML_FLAGS += --nodefined-map $(DEV_PKG):Dgraph + +install/libocamlgraph-ocaml-dev:: install/libocamlgraph-ocaml-doc + mkdir -p $(CURDIR)/debian/$(VIW_PKG)/$(OCAML_STDLIB_DIR)/ocamlgraph/ + for file in dgraph.cmx viewGraph_select.mli dGraphRandModel.mli viewgraph.cmo \ + dGraphViewItem.mli dGraphModel.mli dgraph.cmo viewgraph.cmx viewgraph.cmi \ + dgraph.cmi viewgraph.o dgraph.o dGraphView.mli viewGraph_utils.mli viewGraph_core.mli; do \ + [ ! -f $(CURDIR)/debian/$(DEV_PKG)/$(OCAML_STDLIB_DIR)/ocamlgraph/$$file] || \ + mv $(CURDIR)/debian/$(DEV_PKG)/$(OCAML_STDLIB_DIR)/ocamlgraph/$$file \ + $(CURDIR)/debian/$(VIW_PKG)/$(OCAML_STDLIB_DIR)/ocamlgraph/; \ + done + DEB_STRIP_EXCLUDE += usr/bin/ocamlgraph-editor.byte usr/bin/ocamlgraph-viewer.byte ifeq ($(OCAML_HAVE_OCAMLOPT),no) DEB_STRIP_EXCLUDE += usr/bin/ocamlgraph-editor usr/bin/ocamlgraph-viewer

