summaryrefslogtreecommitdiff
path: root/user/spack/APKBUILD
blob: ee963fd2526da71d07b88a9e3a6414bc653cb4bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Contributor: Zach van Rijn <me@zv.io>
# Maintainer: Zach van Rijn <me@zv.io>
pkgname=spack
pkgver=0.20.3_p1
pkgrel=0
pkgdesc="A flexible package manager for supercomputers."
url="https://spack.io/"
arch="all !ppc"  # see #794
license="Apache-2.0 OR MIT"
options="!dbg !strip"
makedepends="python3-dev"
depends="$makedepends
	gcc g++ gfortran
	bzip2 file git gnupg gzip libarchive-tools make patch unzip xz
	"
subpackages=""
# https://git.adelielinux.org/adelie/docs/-/wikis/Developer-Resources/Maintaining-Spack
source="https://git.adelielinux.org/adelie/$pkgname/-/archive/adelie-v$pkgver/$pkgname-adelie-v$pkgver.tar.bz2
	default-no-buildcache.patch
	archspec-fix-cpu-family-detection.patch
	"
builddir="$srcdir/$pkgname-adelie-v$pkgver"

prepare()
{
	default_prepare

	sed -i etc/spack/defaults/bootstrap.yaml \
		-e '/github-actions/d' \
		;
}

check() {
	##
	# On first run, Spack >=0.17.0 will bootstrap "clingo",
	# 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
	bin/spack install zlib
	rm -fr var/spack/cache
	rm -fr etc/spack/linux # caches compilers.yaml
}

package() {
	for k in etc lib share var; do
		mkdir -p "$pkgdir"/${k};
		cp -r ${k}/spack "$pkgdir"/${k};
	done
	mkdir -p "$pkgdir"/bin
	install \
		bin/sbang \
		bin/spack \
		bin/spack-python \
		"$pkgdir"/bin \
		;
}

sha512sums="9629ee48d4f93158c4c2d3f14bc8755e33df1a82428337fc27495b7bbfba3f056c193b95bcb9f90025d89c7759fcf2ef09a1f1639880a8db87a786ee1bd138e2  spack-adelie-v0.20.3_p1.tar.bz2
eec3e7dd818c39daea7b8d63b04a6c71d9eb3af32dd899cddc3642152252f4e2eebfd53c3c95365117f9a4826f6f29553f44373948e5c474388021302c8a5ce9  default-no-buildcache.patch
a6503238d116b74ff9c4ecd08a984df90ce02f95c3e10e907481d99917c73339db1cc49f2b473a37875b92a9a6607cac72057c0a7b3d9a57d44c89ebe0ad3915  archspec-fix-cpu-family-detection.patch"