changeset 1:9f0143ed0bfe

Actual first working revision Inject OCTAVE_HOME and LD_LIBRARY_PATH environment values needed to run relocated snap binaries. Add minimal build and runtime dependencies.
author Mike Miller <mtmiller@octave.org>
date Tue, 11 Jun 2019 16:39:39 -0400
parents 42a4ce3eb618
children fb09ab721b0c
files snap/snapcraft.yaml
diffstat 1 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/snap/snapcraft.yaml	Tue Jun 11 14:43:43 2019 -0400
+++ b/snap/snapcraft.yaml	Tue Jun 11 16:39:39 2019 -0400
@@ -1,5 +1,5 @@
 name: octave
-base: core18 # the base snap is the execution environment for this snap
+base: core18
 version: '5.1.0'
 summary: Interactive programming environment for numerical computations
 description: |
@@ -12,14 +12,20 @@
   non-interactive programs. The Octave language is quite similar to
   Matlab so that most programs are easily portable.
 
-grade: stable # must be 'stable' to release into candidate/stable channels
+grade: stable
 confinement: strict
 
 apps:
   octave:
     command: bin/octave
+    environment:
+      LD_LIBRARY_PATH: "$SNAP/lib/octave/5.1.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET"
+      OCTAVE_HOME: "$SNAP"
   octave-cli:
     command: bin/octave-cli
+    environment:
+      LD_LIBRARY_PATH: "$SNAP/lib/octave/5.1.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET"
+      OCTAVE_HOME: "$SNAP"
 
 parts:
   octave:
@@ -27,10 +33,12 @@
     source-type: tar
     source: https://ftpmirror.gnu.org/octave/octave-5.1.0.tar.xz
     build-packages:
-      - g++
-      - gfortran
-      - make
+      - libfftw3-dev
       - libopenblas-dev
-      - libfftw3-dev
       - libpcre3-dev
       - libreadline-dev
+    stage-packages:
+      - libfftw3-double3
+      - libfftw3-single3
+      - libopenblas-base
+      - libpcre3