From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca@debian.org>
Date: Thu, 13 Mar 2025 09:11:04 +0100
Subject: install octave files at the right place out of the box

---
 build/linux/Makefile.in | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in
index 7106a70..31fd858 100644
--- a/build/linux/Makefile.in
+++ b/build/linux/Makefile.in
@@ -473,14 +473,15 @@ install: install-matlab install-python-site-packages install-octave
 
 PYPKGDATA=$(abs_top_builddir)/.libs/$(SONAME)
 MATLABBASE=@prefix@/matlab
-OCTAVEBASE=@prefix@/octave
+OCTAVEBASE=@prefix@/share/octave/packages/astra
+OCTAVEBASE_ARCH_DEP=@prefix@/lib/astra/mex/octave
 
 install-matlab-so: libastra.la
 	$(INSTALL_SH) -m 755 -d $(DESTDIR)$(MATLABBASE)/mex
 	$(INSTALL_SH) -m 755 $(abs_top_builddir)/.libs/$(SONAME) $(DESTDIR)$(MATLABBASE)/mex
 install-octave-so: libastra.la
-	$(INSTALL_SH) -m 755 -d $(DESTDIR)$(OCTAVEBASE)/mex
-	$(INSTALL_SH) -m 755 $(abs_top_builddir)/.libs/$(SONAME) $(DESTDIR)$(OCTAVEBASE)/mex
+	$(INSTALL_SH) -m 755 -d $(DESTDIR)$(OCTAVEBASE_ARCH_DEP)/mex
+	$(INSTALL_SH) -m 755 $(abs_top_builddir)/.libs/$(SONAME) $(DESTDIR)$(OCTAVEBASE_ARCH_DEP)/mex
 else
 install-matlab-so:
 install-octave-so:
@@ -546,9 +547,9 @@ endif
 ifeq ($(octave),yes)
 install-octave: $(OCTAVE_MEX) install-octave-so
 	$(INSTALL_SH) -m 755 -d $(DESTDIR)$(OCTAVEBASE)
-	$(INSTALL_SH) -m 755 -d $(DESTDIR)$(OCTAVEBASE)/mex
+	$(INSTALL_SH) -m 755 -d $(DESTDIR)$(OCTAVEBASE_ARCH_DEP)/mex
 	$(INSTALL_SH) -m 755 -d $(DESTDIR)$(OCTAVEBASE)/tools
-	$(INSTALL_SH) -m 755 $(OCTAVE_MEX) $(DESTDIR)$(OCTAVEBASE)/mex
+	$(INSTALL_SH) -m 755 $(OCTAVE_MEX) $(DESTDIR)$(OCTAVEBASE_ARCH_DEP)/mex
 	$(INSTALL_SH) -m 644 $(srcdir)/../../matlab/tools/*.m $(DESTDIR)$(OCTAVEBASE)/tools
 # TODO: docs
 else
