some more changes in doc.
authorng0 <ng0@infotropique.org>
Tue, 26 Sep 2017 15:02:16 +0000 (15:02 +0000)
committerng0 <ng0@infotropique.org>
Tue, 26 Sep 2017 15:02:16 +0000 (15:02 +0000)
contrib/packages/guix/gnunet-doc.scm
doc/Makefile.am
doc/images/structure.dot [new file with mode: 0644]
doc/structure.dot [deleted file]

index d12de10a23f8040419431054c475553ae943e500..a988e1125a4ee33b95571dc64b5c6050e026dcbb 100644 (file)
@@ -46,6 +46,7 @@
  (gnu packages gstreamer)
  (gnu packages gtk)
  (gnu packages guile)
+ (gnu packages graphviz)
  (gnu packages image)
  (gnu packages image-viewers)
  (gnu packages libidn)
          ("autoconf" ,autoconf)
          ("automake" ,automake)
          ("gnu-gettext" ,gnu-gettext)
+         ("graphviz" ,graphviz) ; dot
          ("texinfo-5" ,texinfo-5) ; Debian stable
          ("libtool" ,libtool)))
       (arguments
                (chdir "doc")
                (zero? (system* "make" "doc-all-give-me-the-noise"))))
            (replace 'install
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let* ((out (assoc-ref outputs "out"))
-                      (doc (string-append out "/share/doc/gnunet")))
-                 (mkdir-p doc)
-                 (mkdir-p (string-append doc "/gnunet"))
-                 (install-file "gnunet.pdf" doc)
-                 (install-file "gnunet.info" doc)
-                 (copy-recursively "gnunet"
-                                   (string-append doc
-                                                  "/gnunet"))
-                 (install-file "gnunet-c-tutorial.pdf" doc)
-                 (install-file "gnunet-c-tutorial.info" doc)
-                 (copy-recursively "gnunet-c-tutorial"
-                                   (string-append doc
-                                                  "/gnunet-c-tutorial")))
-               #t)))))
+             (lambda _
+               (zero? (system* "make" "doc-all-install")))))))
+             ;;(lambda* (#:key outputs #:allow-other-keys)
+               ;; (let* ((out (assoc-ref outputs "out"))
+               ;;        (doc (string-append out "/share/doc/gnunet")))
+               ;;   (mkdir-p doc)
+               ;;   (copy-recursively "images"
+               ;;                     (string-append doc
+               ;;                                    "/images"))
+               ;;   (mkdir-p (string-append doc "/gnunet"))
+               ;;   (install-file "gnunet.pdf" doc)
+               ;;   (install-file "gnunet.info" doc)
+               ;;   (install-file "gnunet.log" doc) ;TODO: Move to 'dev' output?
+               ;;   (copy-recursively "gnunet"
+               ;;                     (string-append doc
+               ;;                                    "/gnunet"))
+               ;;   (install-file "gnunet-c-tutorial.pdf" doc)
+               ;;   (install-file "gnunet-c-tutorial.info" doc)
+               ;;   (install-file "gnunet-c-tutorial.log" doc) ;TODO: Move to 'dev' output?
+               ;;   (copy-recursively "gnunet-c-tutorial"
+               ;;                     (string-append doc
+               ;;                                    "/gnunet-c-tutorial")))
+               ;; #t)))))
       (synopsis "Documentation of GNUnet")
       (description
        "GNUnet documentation build")
index ee735f171d1e27ad72d39402c64d16ba7994f6ad..cbb5fb462b8e700eed26c282d30caf138cbf709d 100644 (file)
@@ -5,39 +5,42 @@ docdir = $(datadir)/doc/gnunet/
 
 infoimagedir = $(infodir)/images
 
-dist_infoimage_DATA =                                          \
-       images/gnunet-gtk-0-10-gns-a-done.png                   \
-       images/gnunet-gtk-0-10-gns-a.png                        \
-       images/daemon_lego_block.png                            \
-       images/gnunet-gtk-0-10-gns.png                          \
-       images/gnunet-0-10-peerinfo.png                         \
-       images/gnunet-gtk-0-10-identity.png                     \
-       images/gnunet-fs-gtk-0-10-star-tab.png                  \
-       images/gnunet-gtk-0-10.png                              \
-       images/gnunet-gtk-0-10-download-area.png                \
-       images/gnunet-gtk-0-10-search-selected.png              \
-       images/gnunet-gtk-0-10-fs-menu.png                      \
-       images/gnunet-gtk-0-10-traffic.png                      \
-       images/gnunet-gtk-0-10-fs.png                           \
-       images/gnunet-namestore-gtk-phone.png                   \
-       images/gnunet-gtk-0-10-fs-publish-editing.png           \
-       images/gnunet-namestore-gtk-vpn.png                     \
-       images/gnunet-gtk-0-10-fs-published.png                 \
-       images/gnunet-setup-exit.png                            \
-       images/gnunet-gtk-0-10-fs-publish.png                   \
-       images/iceweasel-preferences.png                        \
-       images/gnunet-gtk-0-10-fs-publish-select.png            \
-       images/iceweasel-proxy.png                              \
-       images/gnunet-gtk-0-10-fs-publish-with-file_0.png       \
-       images/service_lego_block.png                           \
-       images/gnunet-gtk-0-10-fs-publish-with-file.png         \
-       images/service_stack.png                                \
-       images/gnunet-gtk-0-10-fs-search.png                    \
-       images/gnunet-tutorial-service.png                      \
-       images/gnunet-tutorial-system.png                       \
-       images/daemon_lego_block.svg                            \
-       images/lego_stack.svg                                   \
-       images/service_lego_block.svg
+DOT_FILES = images/$(wildcard *.dot)
+
+DOT_VECTOR_GRAPHICS =                                                          \
+       $(DOT_FILES:%.dot=%.eps)                                                \
+       $(DOT_FILES:%.dot=%.pdf)
+
+dist_infoimage_DATA =                                                          \
+       images/$(wildcard *.png)                                                \
+       images/$(wildcard *.svg)                                                \
+       $(DOT_FILES:%.dot=%.png)
+
+DOT_OPTIONS =                                                                  \
+       -Gratio=.9 -Gnodesep=.005 -Granksep=.00005                              \
+       -Nfontsite=9 -Nheight=.1 -Nwidth=.1
+
+.dot.png:
+       $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
+       mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
+
+.dot.pdf:
+       $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
+       mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
+
+.dot.eps:
+       $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
+       mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
+
+.png.eps:
+       $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \
+       mv "$@-tmp.eps" "$@"
+
+pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf)
+info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png)
+ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps)                \
+       $(top_srcdir)/%D%/images/coreutils-size-map.eps
+dvi-local: ps-local
 
 gnunet_tutorial_examples =                                     \
        001.c                                                   \
@@ -83,11 +86,13 @@ gnunet_TEXINFOS = \
        fdl-1.3.texi \
        gpl-3.0.texi
 
-EXTRA_DIST = \
-       $(gnunet_TEXINFOS) \
-       $(gnunet_tutorial_examples) \
-       outdated-and-old-installation-instructions.txt \
-       gnunet-c-tutorial-v1.pdf \
+EXTRA_DIST =                                                                   \
+       $(gnunet_TEXINFOS)                                                      \
+       $(gnunet_tutorial_examples)                                             \
+       $(DOT_FILES)                                                            \
+       $(DOT_VECTOR_GRAPHICS)                                                  \
+       outdated-and-old-installation-instructions.txt                          \
+       gnunet-c-tutorial-v1.pdf                                                \
        README.txt
 
 daemon_lego_block.png: images/daemon_lego_block.svg
@@ -146,4 +151,24 @@ doc-info-tutorial-noise: version.texi
 
 doc-all-give-me-the-noise: doc-pdf-noise doc-html-noise doc-info-noise doc-pdf-tutorial-noise doc-html-tutorial-noise doc-info-tutorial-noise
 
+doc-all-install: doc-all-give-me-the-noise
+       @mkdir -p $(DESTDIR)/$(docdir)
+       @mkdir -p $(DESTDIR)/$(infoimagedir)
+       @mkdir -p $(DESTDIR)/$(infodir)
+       @install -m 0755 gnunet.pdf $(DESTDIR)/$(docdir)
+       @install -m 0755 gnunet-c-tutorial.pdf $(DESTDIR)/$(docdir)
+       @install -m 0755 gnunet-c-tutorial.info $(DESTDIR)/$(infodir)
+       @install -m 0755 gnunet.info $(DESTDIR)/$(infodir)
+       @cp -r gnunet $(DESTDIR)/$(docdir)
+       @cp -r gnunet-c-tutorial $(DESTDIR)/$(docdir)
+       @cp -r images $(DESTDIR)/$(infoimagedir)
+
+CLEANFILES =                                           \
+       gnunet.log                                      \
+       gnunet-c-tutorial.log                           \
+       $(wildcard *.aux)                               \
+       $(wildcard *.toc)                               \
+       $(wildcard *.cp)                                \
+       $(wildcard *.cps)
+
 .PHONY: version.texi
diff --git a/doc/images/structure.dot b/doc/images/structure.dot
new file mode 100644 (file)
index 0000000..a53db90
--- /dev/null
@@ -0,0 +1,124 @@
+// house = application
+// circle (default) = service
+// box = daemon
+// diamond = library
+// black line = dependency
+// blue line = extension via plugin
+// red line = possibly useful
+// dashed = in planning
+
+// this is what we have...o
+digraph dependencies {
+splines = true;
+
+  voting [shape=house];
+  voting -> consensus;
+  voting -> identity;
+  voting -> cadet;
+  voting -> secretsharing;
+  secretsharing -> consensus;
+
+  fs [shape=house];
+  fs -> dht;
+  fs -> core;
+  fs -> datastore;
+  fs -> cadet;
+  fs -> ats;
+  fs -> block [style=dotted,color=blue];
+  fs -> identity;
+  exit [shape=box];
+  exit -> cadet;
+  exit -> tun;
+  exit -> dnsstub;
+  vpn -> cadet;
+  vpn -> regex;
+  vpn -> tun;
+  pt [shape=house];
+  pt -> cadet;
+  pt -> vpn;
+  pt -> dns;
+  pt -> dnsparser;
+  dns -> tun;
+  dns -> dnsstub;
+  zonemaster [shape=house];
+  zonemaster -> namestore;
+  zonemaster -> dht;
+  gns -> dns;
+  gns -> dht;
+  gns -> block [style=dotted,color=blue];
+  gns -> revocation;
+  gns -> vpn;
+  gns -> dnsparser;
+  gns -> dnsstub;
+  gns -> identity;
+  revocation -> core;
+  revocation -> set;
+  namestore -> identity;
+  namestore -> gnsrecord;
+  dnsparser -> gnsrecord [style=dotted,color=blue];
+  conversation -> gnsrecord [style=dotted,color=blue];
+  gns -> gnsrecord;
+  dht -> core;
+  dht -> nse;
+  dht -> block;
+  dht -> datacache;
+  dht -> peerinfo;
+  dht -> hello;
+  nse -> core;
+  regex -> block [style=dotted,color=blue];
+  block [shape=diamond];
+  datacache [shape=diamond];
+  cadet -> core [weight=2];
+  cadet -> dht;
+  cadet -> block [style=dotted,color=blue];
+  conversation [shape=house];
+  conversation -> cadet;
+  conversation -> gns;
+  conversation -> speaker;
+  conversation -> microphone;
+  speaker [shape=diamond];
+  microphone [shape=diamond];
+  regex -> dht;
+  core -> transport;
+  topology [shape=box];
+  topology -> peerinfo;
+  topology -> transport;
+  topology -> core;
+  topology -> hello;
+  hostlist [shape=box];
+  hostlist -> core;
+  hostlist -> peerinfo;
+  hostlist -> hello;
+  transport -> ats;
+  transport -> hello;
+  transport -> peerinfo;
+  transport -> nat;
+  transport -> fragmentation;
+  consensus -> set;
+  consensus -> cadet;
+  scalarproduct -> set;
+  scalarproduct -> cadet;
+  set -> cadet;
+  peerinfo -> hello;
+  fragmentation [shape=diamond];
+  hello [shape=diamond];
+  nat [shape=diamond];
+  tun [shape=diamond];
+  dnsparser [shape=diamond];
+  dnsstub [shape=diamond];
+
+  secushare [shape=house];
+  multicast;
+  psyc;
+  social -> psyc;
+  social -> gns;
+  psyc -> psycstore;
+  psycstore;
+  social;
+  secushare -> social;
+  psyc -> multicast;
+  multicast -> cadet;
+
+  rps;
+  rps -> core;
+}
diff --git a/doc/structure.dot b/doc/structure.dot
deleted file mode 100644 (file)
index a53db90..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-// house = application
-// circle (default) = service
-// box = daemon
-// diamond = library
-// black line = dependency
-// blue line = extension via plugin
-// red line = possibly useful
-// dashed = in planning
-
-// this is what we have...o
-digraph dependencies {
-splines = true;
-
-  voting [shape=house];
-  voting -> consensus;
-  voting -> identity;
-  voting -> cadet;
-  voting -> secretsharing;
-  secretsharing -> consensus;
-
-  fs [shape=house];
-  fs -> dht;
-  fs -> core;
-  fs -> datastore;
-  fs -> cadet;
-  fs -> ats;
-  fs -> block [style=dotted,color=blue];
-  fs -> identity;
-  exit [shape=box];
-  exit -> cadet;
-  exit -> tun;
-  exit -> dnsstub;
-  vpn -> cadet;
-  vpn -> regex;
-  vpn -> tun;
-  pt [shape=house];
-  pt -> cadet;
-  pt -> vpn;
-  pt -> dns;
-  pt -> dnsparser;
-  dns -> tun;
-  dns -> dnsstub;
-  zonemaster [shape=house];
-  zonemaster -> namestore;
-  zonemaster -> dht;
-  gns -> dns;
-  gns -> dht;
-  gns -> block [style=dotted,color=blue];
-  gns -> revocation;
-  gns -> vpn;
-  gns -> dnsparser;
-  gns -> dnsstub;
-  gns -> identity;
-  revocation -> core;
-  revocation -> set;
-  namestore -> identity;
-  namestore -> gnsrecord;
-  dnsparser -> gnsrecord [style=dotted,color=blue];
-  conversation -> gnsrecord [style=dotted,color=blue];
-  gns -> gnsrecord;
-  dht -> core;
-  dht -> nse;
-  dht -> block;
-  dht -> datacache;
-  dht -> peerinfo;
-  dht -> hello;
-  nse -> core;
-  regex -> block [style=dotted,color=blue];
-  block [shape=diamond];
-  datacache [shape=diamond];
-  cadet -> core [weight=2];
-  cadet -> dht;
-  cadet -> block [style=dotted,color=blue];
-  conversation [shape=house];
-  conversation -> cadet;
-  conversation -> gns;
-  conversation -> speaker;
-  conversation -> microphone;
-  speaker [shape=diamond];
-  microphone [shape=diamond];
-  regex -> dht;
-  core -> transport;
-  topology [shape=box];
-  topology -> peerinfo;
-  topology -> transport;
-  topology -> core;
-  topology -> hello;
-  hostlist [shape=box];
-  hostlist -> core;
-  hostlist -> peerinfo;
-  hostlist -> hello;
-  transport -> ats;
-  transport -> hello;
-  transport -> peerinfo;
-  transport -> nat;
-  transport -> fragmentation;
-  consensus -> set;
-  consensus -> cadet;
-  scalarproduct -> set;
-  scalarproduct -> cadet;
-  set -> cadet;
-  peerinfo -> hello;
-  fragmentation [shape=diamond];
-  hello [shape=diamond];
-  nat [shape=diamond];
-  tun [shape=diamond];
-  dnsparser [shape=diamond];
-  dnsstub [shape=diamond];
-
-  secushare [shape=house];
-  multicast;
-  psyc;
-  social -> psyc;
-  social -> gns;
-  psyc -> psycstore;
-  psycstore;
-  social;
-  secushare -> social;
-  psyc -> multicast;
-  multicast -> cadet;
-
-  rps;
-  rps -> core;
-}