[Pkg-octave-commit] [octave] 04/04: Add a Debian-specific error handler
Rafael Laboissière
rlaboiss-guest at moszumanska.debian.org
Sat Dec 14 09:30:49 UTC 2013
This is an automated email from the git hooks/post-receive script.
rlaboiss-guest pushed a commit to branch master
in repository octave.
commit 45d0ac34487d5316d0770f48e1dbef499033ac06
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date: Sat Dec 14 10:23:36 2013 +0100
Add a Debian-specific error handler
---
debian/copyright | 3 ++-
debian/debian_missing_handler.m | 36 ++++++++++++++++++++++++++++++++++++
debian/octave-common.install | 3 +++
debian/octave.conf | 4 ++++
4 files changed, 45 insertions(+), 1 deletion(-)
diff --git a/debian/copyright b/debian/copyright
index 319e988..35f4712 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -131,9 +131,10 @@ Files: debian/*
Copyright: Andrew D. Fernandes <adfernan at cnd.mcgill.ca>
Dale Scheetz <dwarf at polaris.net>
Dirk Eddelbuettel <edd at debian.org>
- 2005-2009, 2012 Rafael Laboissiere <rafael at laboissiere.net>
+ 2005-2009, 2012, 2013 Rafael Laboissiere <rafael at laboissiere.net>
2006-2012 Thomas Weber <tweber at debian.org>
2011-2013 Sébastien Villemot <sebastien at debian.org>
+ 2013 Mike Miller <mtmiller at ieee.org>
License: GPL-3+
Files: liboctave/cruft/amos/*
diff --git a/debian/debian_missing_handler.m b/debian/debian_missing_handler.m
new file mode 100644
index 0000000..401d209
--- /dev/null
+++ b/debian/debian_missing_handler.m
@@ -0,0 +1,36 @@
+## Copyright (C) 2013 Mike Miller <mtmiller at ieee.org>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING. If not, see
+## <http://www.gnu.org/licenses/>.
+
+## This file was modified for Debian from the original file available at:
+## https://savannah.gnu.org/file/distro_missing_handler.m?file_id=29104
+## by Rafael Laboiissiere <rafael at laboissiere.net>
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{msg} =} debian_missing_handler (@var{name})
+## Debian-specific hook function for the missing component handler
+## (see missing_component_hook).
+## @end deftypefn
+
+function msg = debian_missing_handler (name)
+ switch (name)
+ case "info-file"
+ msg = "please install the Debian package \"octave-info\" to get the Octave manual";
+ case "mkoctfile"
+ msg = "please install the Debian package \"octave-dev\" to get the mkoctfile command";
+ otherwise
+ msg = [];
+ endswitch
+endfunction
diff --git a/debian/octave-common.install b/debian/octave-common.install
index e02e3bc..f33eb29 100644
--- a/debian/octave-common.install
+++ b/debian/octave-common.install
@@ -2,3 +2,6 @@ usr/share/octave /usr/share/
# install the configuration file we copied into the built tmp tree
/etc/octave.conf /etc
+
+# Install the Debian-specific error handler
+debian/debian_missing_handler.m /usr/share/octave/${DEB_VERSION_UPSTREAM}/m/debian/
\ No newline at end of file
diff --git a/debian/octave.conf b/debian/octave.conf
index e9293d6..b5dfe14 100644
--- a/debian/octave.conf
+++ b/debian/octave.conf
@@ -33,3 +33,7 @@ clear suffix;
pkg ("load", "auto");
atexit ("__finish__");
+
+## Set the Debian-specific error handler
+
+missing_component_hook ("debian_missing_handler");
--
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave.git
More information about the Pkg-octave-commit
mailing list