From 9d68a51ec06929d33b39c390cac6f81b8197e800 Mon Sep 17 00:00:00 2001 From: Olaf Mersmann Date: Sat, 16 Jan 2021 23:17:17 +0100 Subject: [PATCH] New package: singularity-3.7.1 --- srcpkgs/singularity/INSTALL | 6 ++++ srcpkgs/singularity/template | 55 ++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 srcpkgs/singularity/INSTALL create mode 100644 srcpkgs/singularity/template diff --git a/srcpkgs/singularity/INSTALL b/srcpkgs/singularity/INSTALL new file mode 100644 index 00000000000..a549cd1e2ef --- /dev/null +++ b/srcpkgs/singularity/INSTALL @@ -0,0 +1,6 @@ +case "${ACTION}" in +post) + mkdir -p var/lib/singularity/mnt/session + chown root:_singularity usr/libexec/singularity/bin/starter-suid + chmod 4755 usr/libexec/singularity/bin/starter-suid +esac diff --git a/srcpkgs/singularity/template b/srcpkgs/singularity/template new file mode 100644 index 00000000000..d6461d08509 --- /dev/null +++ b/srcpkgs/singularity/template @@ -0,0 +1,55 @@ +# Template file for 'singularity' +pkgname=singularity +version=3.7.1 +revision=1 +wrksrc="${pkgname}" +build_style=go +go_import_path=github.com/sylabs.io/singularity +go_mod_mode=vendor +hostmakedepends="wget pkg-config go cryptsetup" +makedepends="libressl-devel libseccomp-devel" +depends="squashfs-tools cryptsetup" +short_desc="HPC centric container platform" +maintainer="Olaf Mersmann " +license="BSD-3-Clause-LBNL" +homepage="https://sylabs.io/singularity/" +distfiles="https://github.com/hpcng/${pkgname}/releases/download/v${version}/${pkgname}-${version}.tar.gz" +checksum=82d2c65063560195ec34551931be3c325b95e8e2009e92755fd7daad346e083c +nocross=yes +system_groups="_singularity" + +do_configure() { + ./mconfig \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --libexecdir=/usr/libexec \ + --sysconfdir=/etc \ + --sharedstatedir=/var/lib \ + --mandir=/usr/share/man \ + --localstatedir=/var/lib + + # Fixup Makefile + # * Force use of vendored packages + # * Don't install bash completions into /etc/bash_completion.d + vsed -i \ + -e 's@^GO_MODFLAGS := .*@GO_MODFLAGS := -mod=vendor@' \ + -e 's@INSTALLFILES += $(bash_completion_INSTALL)@@' \ + builddir/Makefile +} + +do_build() { + srcdir=$PWD make -C builddir old_config= +} + +do_install() { + make DESTDIR="${DESTDIR}" -C builddir install man + vlicense LICENSE.md + vcompletion builddir/etc/bash_completion.d/singularity bash +} + +do_check() { + # XXX: tests require sudo, so skip for now. + # make -C builddir unit-test integration-test e2e-test + : "Pass" +}