Description: Use the architecture-independent path
 The *.m are installed under /usr/share/octave/packages/ocs-<version>/,
 which is not the same as were the PKG_ADD file lands.  This patch remedies
 the problem.
Author: Rafael Laboissiere <rafael@debian.org>
Forwarded: not-needed
Last-Update: 2012-03-17
Last-Modified: 2017-06-20

--- octave-ocs-0.1.3.orig/PKG_ADD
+++ octave-ocs-0.1.3/PKG_ADD
@@ -1,10 +1,13 @@
 dirlist = {"utl", "asm", "tst", "nls", "prs", "sbn"};
 dirname = fileparts (canonicalize_file_name (mfilename ("fullpath")));
+dirname = sprintf ("%s%s",
+                   dirname (1 : strfind (dirname, "usr/lib/") - 1),
+                   "usr/share/octave/packages/ocs-0.1.5/");
 
 if (! exist (fullfile (dirname, "inst"), "dir"))
   ## Run this if the package is installed
   for ii=1:length (dirlist)
-    addpath (fullfile (dirname, "..", dirlist{ii}), "-end")
+    addpath (fullfile (dirname, dirlist{ii}), "-end")
   endfor
 else
   ## Run this if we are testing the package without installation
--- octave-ocs-0.1.3.orig/PKG_DEL
+++ octave-ocs-0.1.3/PKG_DEL
@@ -1,10 +1,13 @@
 dirlist = {"utl", "asm", "tst", "nls", "prs", "sbn"};
 dirname = fileparts (canonicalize_file_name (mfilename ("fullpath")));
+dirname = sprintf ("%s%s",
+                   dirname (1 : strfind (dirname, "usr/lib/") - 1),
+                   "usr/share/octave/packages/ocs-0.1.5/");
 
 if (! exist (fullfile (dirname, "inst"), "dir"))
   ## Run this if the package is installed
   for ii=1:length (dirlist)
-    rmpath (fullfile (dirname, "..", dirlist{ii}))
+    rmpath (fullfile (dirname, dirlist{ii}))
   endfor
 else
   ## Run this if we are testing the package without installation
