diff --git a/bin/make_packages_yaml b/bin/make_packages_yaml index 741b8ea..8a35031 100755 --- a/bin/make_packages_yaml +++ b/bin/make_packages_yaml @@ -47,7 +47,15 @@ done os=${2:-`spack arch -o`} optf=$dir/templates/package_opts.$os -dst=$1/etc/spack/$os/packages.yaml + +if [ "$(spack --version)" -gt "0.20.0" ] +then + sd="$(spack arch --platform)/" +else + sd="" +fi + +dst=$1/etc/spack/${sd}${os}/packages.yaml # packages to make not buildable force_system='^(bdftopcf|damageproto|diffutils|expat|findutils|font-util|gdbm|gettext|libc|libfontenc|libice|libx11|libxau|libxcb|libxdamage|libxdmcp|libxext|libxfixes|libxfont|libxkbcommon|libxmu|libxpm|libxrandr|libxrender|libxshmfence|libxt|libxv|libxvmc|libxxf86vm|mesa-glu|mkfontdir|mkfontscale|openssl|pkg-config|pkgconf|tar|tcl|tk|xcb-util-(image|keysyms|renderutil|wm)|xextproto|xorg-server|xproto|xproxymanagementprotocol|xrandr|xtrans|zlib)$' diff --git a/bin/make_spack b/bin/make_spack index 3c0f5c2..0318899 100755 --- a/bin/make_spack +++ b/bin/make_spack @@ -93,13 +93,13 @@ bootstrap_spack() { then make_packages_yaml $SPACK_ROOT else - if [ "$spack_release" -gt "v0.20.0" ] + if [ "$(spack --version)" -gt "0.20.0" ] then - sd="linux" + sd="$(spack arch --platform)/" else sd="" fi - cp $spackbindir/../templates/packages.yaml.${os} $SPACK_ROOT/etc/spack/$sd/${os}/packages.yaml + cp $spackbindir/../templates/packages.yaml.${os} $SPACK_ROOT/etc/spack/${sd}${os}/packages.yaml fi }