aboutsummaryrefslogtreecommitdiffstats
path: root/testing/singularity/APKBUILD
blob: de9ecde28fe57b652c5a5915164bd5c41c5ba80b (plain)
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
63
64
65
66
67
68
69
70
71
# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=singularity
pkgver=3.4.2
pkgrel=0
pkgdesc="Application containers focused on reproducibility for scientific computing and HPC world."
url="https://www.sylabs.io/singularity/"
arch="all"
license="BSD-3-Clause BSD-3-Clause-LBNL"
options="suid !check" # no test suite from upstream
depends="squashfs-tools"
makedepends="
	go
	linux-headers
	binutils-gold
	openssl-dev
	libuuid
	util-linux-dev
	libseccomp-dev
	cryptsetup
	"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/sylabs/singularity/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/sylabs/$pkgname"

prepare() {
	export GOPATH="$srcdir"

	mkdir -p "$(dirname $builddir)"
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/

	echo "$pkgver" > "$builddir"/VERSION
	default_prepare
}

build() {
	export GOPATH="$srcdir"
	export GOBIN="$GOPATH/bin"

	./mconfig \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/infodir \
		--localstatedir=/var

	make -C builddir
}

package() {
	make -C builddir DESTDIR="$pkgdir" install

	install -m644 -D -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md
	install -m644 -D -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE-LBNL.md
	install -m644 -D -t "$pkgdir/usr/share/doc/$pkgname" README.md
}

bashcomp() {
	depends=""
	pkgdesc="Bash completion for $pkgname"


	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	mkdir -p "$subpkgdir"/usr/share/bash-completion/completions

	mv "$pkgdir"/etc/bash_completion.d/singularity \
		"$subpkgdir"/usr/share/bash-completion/completions/singularity
}

sha512sums="d72a8a493c42c5da892d8c36fa2c11cbb5168fd42bd59dbefaa13c7d65307e50071068a2be2947bb7ed6172cf2459f914e1adeff32e52c5b0a4b1a7bfddca167  singularity-3.4.2.tar.gz"