[Pkg-octave-commit] [octave-optim] 08/09: Handle new info documentation.
Sébastien Villemot
sebastien at debian.org
Wed Aug 6 17:16:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
sebastien pushed a commit to branch master
in repository octave-optim.
commit 69c9345779993015a849a23a785aa22f4eefd1f8
Author: Sébastien Villemot <sebastien at debian.org>
Date: Wed Aug 6 19:11:33 2014 +0200
Handle new info documentation.
- install it under /usr/share/info rather than package directory.
- info-file-path.patch: indicate the new path to optim_doc().
- add-info-dir.patch: add @direntry and @dircategory to the info file.
Git-Dch: Full
---
debian/patches/add-info-dir.patch | 24 +++++++++++++++++++++++
debian/patches/info-file-path.patch | 38 +++++++++++++++++++++++++++++++++++++
debian/patches/series | 2 ++
debian/rules | 7 +++++++
4 files changed, 71 insertions(+)
diff --git a/debian/patches/add-info-dir.patch b/debian/patches/add-info-dir.patch
new file mode 100644
index 0000000..f9c674e
--- /dev/null
+++ b/debian/patches/add-info-dir.patch
@@ -0,0 +1,24 @@
+Description: Add direntry and dircategory for the info file
+ This is needed because we install it under /usr/share/info.
+Author: Sébastien Villemot <sebastien at debian.org>
+Forwarded: not-needed
+Last-Update: 2014-08-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/doc/optim.txi
++++ b/doc/optim.txi
+@@ -4,6 +4,14 @@
+ @settitle optim_doc
+ @c %**end of header
+
++ at ifinfo
++ at dircategory Math
++ at direntry
++* Octave-optim: (octave-optim). Non-linear optimization toolkit for Octave.
++ at end direntry
++ at end ifinfo
++
++
+ @copying
+ Additional documentation for the optim package for Octave.
+
diff --git a/debian/patches/info-file-path.patch b/debian/patches/info-file-path.patch
new file mode 100644
index 0000000..1066df8
--- /dev/null
+++ b/debian/patches/info-file-path.patch
@@ -0,0 +1,38 @@
+Description: Indicate to optim_doc() that the info file is in /usr/share/info
+Author: Sébastien Villemot <sebastien at debian.org>
+Forwarded: not-needed
+Last-Update: 2014-08-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/inst/optim_doc.m
++++ b/inst/optim_doc.m
+@@ -32,28 +32,7 @@ function optim_doc (keyword)
+ endif
+
+ ## locate installed documentation
+- persistent infopath = "";
+- if (isempty (infopath))
+- [local_list, global_list] = pkg ("list");
+- if (! isempty (idx = ...
+- find (strcmp ("optim",
+- {structcat(1, local_list{:}).name}),
+- 1)))
+- idir = local_list{idx}.dir;
+- elseif (! isempty (idx = ...
+- find (strcmp ("optim",
+- {structcat(1, global_list{:}).name}),
+- 1)))
+- idir = global_list{idx}.dir;
+- else
+- error ("no installed optim package found");
+- endif
+- infopath = fullfile (idir, "doc/", "optim.info");
+- ## allow for .gz
+- if (! exist (infopath, "file"))
+- infopath = strcat (infopath, ".gz");
+- endif
+- endif
++ persistent infopath = "/usr/share/info/octave-optim.info.gz";
+
+ ## display info
+ INFO = info_program ();
diff --git a/debian/patches/series b/debian/patches/series
index 32e28e8..04656c8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,4 @@
autoload-yes.patch
texinfo5.patch
+add-info-dir.patch
+info-file-path.patch
diff --git a/debian/rules b/debian/rules
index 2e0ebc2..2789b1a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,3 +4,10 @@
DEB_COMPRESS_EXCLUDE_ALL = .lyx .eps .eps2
include /usr/share/cdbs/1/class/octave-pkg.mk
+
+# Recompile the info file (it has been cleaned by the pkg install), and then
+# install it in the system-wide directory (after renaming it).
+install/octave-optim::
+ make -C src ../doc/optim.info
+ mkdir -p debian/octave-optim/usr/share/info/
+ cp doc/optim.info debian/octave-optim/usr/share/info/octave-optim.info
--
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-optim.git
More information about the Pkg-octave-commit
mailing list