summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/spack/APKBUILD34
-rw-r--r--user/spack/spack.post-install28
2 files changed, 46 insertions, 16 deletions
diff --git a/user/spack/APKBUILD b/user/spack/APKBUILD
index ef1b8250f..1ffc6ab79 100644
--- a/user/spack/APKBUILD
+++ b/user/spack/APKBUILD
@@ -2,16 +2,17 @@
# Maintainer: Zach van Rijn <me@zv.io>
pkgname=spack
pkgver=0.20.3_p1
-pkgrel=1
+pkgrel=2
pkgdesc="A flexible package manager for supercomputers."
url="https://spack.io/"
arch="all"
license="Apache-2.0 OR MIT"
-options="!dbg !strip"
+options="!dbg !strip !fhs"
makedepends="python3-dev"
depends="$makedepends
gcc g++ gfortran
bzip2 file git gnupg gzip libarchive-tools make patch unzip xz
+ linux-headers
"
subpackages=""
# https://git.adelielinux.org/adelie/docs/-/wikis/Developer-Resources/Maintaining-Spack
@@ -22,15 +23,18 @@ source="https://git.adelielinux.org/adelie/$pkgname/-/archive/adelie-v$pkgver/$p
default-no-buildcache.patch
"
-builddir="$srcdir/$pkgname-adelie-v$pkgver"
+install="$pkgname.post-install"
+builddir="${srcdir}/${pkgname}-adelie-v${pkgver}"
prepare()
{
default_prepare
- sed -i etc/spack/defaults/bootstrap.yaml \
- -e '/github-actions/d' \
- ;
+ # disable binary bootstrap
+ sed -i etc/spack/defaults/bootstrap.yaml -e '/github-actions/d';
+
+ # delete windows files
+ find bin \( -name '*.ps1' -o -name '*.py' -o -name '*.bat' \) -delete;
}
check() {
@@ -39,24 +43,22 @@ check() {
# Spack's new "concretizer". The output from this process
# is not kept, however it demonstrates Spack's functionality.
export SPACK_DISABLE_LOCAL_CONFIG=true
- export SPACK_USER_CONFIG_PATH=$builddir/tmp
- export SPACK_USER_CACHE_PATH=$builddir/tmp
+ export SPACK_USER_CONFIG_PATH=${builddir}/tmp
+ export SPACK_USER_CACHE_PATH=${builddir}/tmp
bin/spack --debug install zlib
+
rm -fr var/spack/cache
rm -fr etc/spack/linux # caches compilers.yaml
}
package() {
- find bin \( -name '*.ps1' -o -name '*.py' -o -name '*.bat' \) -delete;
-
- install -m755 -d "$pkgdir"/usr;
- for k in bin share lib; do
- mv ${k} "$pkgdir"/usr/${k};
+ install -m755 -d "${pkgdir}"/opt/spack;
+ for k in bin etc lib share var; do
+ mv "${k}" "${pkgdir}"/opt/spack;
done
- for k in etc var; do
- install -m755 -d "$pkgdir"/${k};
- mv ${k}/spack "$pkgdir"/${k};
+ for k in LICENSE-APACHE LICENSE-MIT NOTICE; do
+ install -Dm644 ${k} "${pkgdir}"/usr/share/licenses/${pkgname}/${k};
done
}
diff --git a/user/spack/spack.post-install b/user/spack/spack.post-install
new file mode 100644
index 000000000..03e76cde4
--- /dev/null
+++ b/user/spack/spack.post-install
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+
+cat <<EOF
+*
+* Welcome to Spack on the Adélie Linux platform, the first
+* musl-based distribution for supercomputers.
+*
+* Please keep in mind that binary mirrors are not currently
+* available for this platform, so all packages will need to
+* be built from source, including the initial bootstrap.
+*
+*
+* The Spack environment is obtained by sourcing:
+*
+* $ . /opt/spack/share/spack/setup-env.sh
+*
+*
+* Documentation:
+*
+* https://spack.readthedocs.io/
+*
+
+* Report Adélie-specific Spack issues:
+*
+* https://git.adelielinux.org/adelie/spack/-/issues
+* https://git.adelielinux.org/adelie/packages/-/issues
+*
+EOF