aboutsummaryrefslogtreecommitdiffstats
path: root/testing/singularity/APKBUILD
blob: bc70fda753c38ef862449c7f55e962250ee02b10 (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
# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=singularity
pkgver=3.3.0
pkgrel=1
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
	"
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"/

	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="41c9b7ef2986b275a761295b2b8ce0bf7c323d1f67098486f591da08ff834f953ee336fd00f0a75abef188ed9182bdca9971254f7e406032f42323250b05da82  singularity-3.3.0.tar.gz"