./mconfig -v ${myconfargs[@]}|| die "Error invoking mconfig"
}
src_compile(){
emake -C builddir
}
src_install(){
emake DESTDIR="${D}" -C builddir install
keepdir /var/${PN}/mnt/session
if use systemd;then
sed -i -e '/systemd cgroups/ s/no/yes/'"${ED}"/etc/${PN}/${PN}.conf || die "Failed to enable systemd use in configuration"
else
sed -i -e '/systemd cgroups/ s/yes/no/'"${ED}"/etc/${PN}/${PN}.conf || die "Failed to disable systemd use in configuration"
fi
einstalldocs
if use examples;then
dodoc -r examples
fi
}
pkg_postinst(){
if ! use suid;then
local oldver
for oldver in ${REPLACING_VERSIONS};do
if ver_test "${oldver}" -lt 1.1.0;then
ewarn "Since version 1.1.0 ${PN} no longer installs setuid-root components by default, relying on unprivileged user namespaces instead. For details, see https://apptainer.org/docs/admin/main/user_namespace.html"
ewarn "Make sure user namespaces (possibly except network ones for improved security) are enabled on your system, or re-enable installation of setuid root components by passing USE=suid to ${CATEGORY}/${PN}"