github.com/tri-adam/singularity@v3.1.1+incompatible/dist/rpm/singularity.spec.in (about) 1 # 2 # Copyright (c) 2017-2018, SyLabs, Inc. All rights reserved. 3 # Copyright (c) 2017, SingularityWare, LLC. All rights reserved. 4 # 5 # Copyright (c) 2015-2017, Gregory M. Kurtzer. All rights reserved. 6 # 7 # Copyright (c) 2016, The Regents of the University of California, through 8 # Lawrence Berkeley National Laboratory (subject to receipt of any required 9 # approvals from the U.S. Dept. of Energy). All rights reserved. 10 # 11 # This software is licensed under a customized 3-clause BSD license. Please 12 # consult LICENSE file distributed with the sources of this project regarding 13 # your rights to use or distribute this software. 14 # 15 # NOTICE. This Software was developed under funding from the U.S. Department of 16 # Energy and the U.S. Government consequently retains certain rights. As such, 17 # the U.S. Government has been granted for itself and others acting on its 18 # behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software 19 # to reproduce, distribute copies to the public, prepare derivative works, and 20 # perform publicly and display publicly, and to permit other to do so. 21 # 22 # 23 24 %define singgopath src/github.com/sylabs/singularity 25 26 # Disable debugsource packages; otherwise it ends up with an empty %files 27 # file in debugsourcefiles.list on Fedora 28 %undefine _debugsource_packages 29 30 Summary: Application and environment virtualization 31 Name: singularity 32 Version: @PACKAGE_VERSION@ 33 Release: @PACKAGE_RELEASE@%{?dist} 34 # https://spdx.org/licenses/BSD-3-Clause-LBNL.html 35 License: BSD-3-Clause-LBNL 36 URL: https://www.sylabs.io/singularity/ 37 Source: %{name}-%{version}.tar.gz 38 ExclusiveOS: linux 39 %if "%{_target_vendor}" == "suse" 40 %if "%{sles_version}" != "11" 41 BuildRequires: go 42 %endif 43 %else 44 BuildRequires: golang 45 %endif 46 BuildRequires: git 47 BuildRequires: gcc 48 BuildRequires: make 49 BuildRequires: libuuid-devel 50 BuildRequires: openssl-devel 51 %if ! 0%{?el6} 52 %if "%{sles_version}" != "11" 53 BuildRequires: libseccomp-devel 54 %endif 55 %endif 56 %if "%{_target_vendor}" == "suse" 57 Requires: squashfs 58 %else 59 Requires: squashfs-tools 60 %endif 61 62 # there's no golang for ppc64, just ppc64le 63 ExcludeArch: ppc64 64 65 Provides: %{name}-runtime 66 Obsoletes: %{name}-runtime 67 68 %description 69 Singularity provides functionality to make portable 70 containers that can be used across host environments. 71 72 %debug_package 73 74 %prep 75 # Create our build root 76 rm -rf %{name}-%{version} 77 mkdir %{name}-%{version} 78 79 %build 80 cd %{name}-%{version} 81 82 mkdir -p gopath/%{singgopath} 83 tar -C "gopath/src/github.com/sylabs/" -xf "%SOURCE0" 84 85 export GOPATH=$PWD/gopath 86 export PATH=$GOPATH/bin:$PATH 87 cd $GOPATH/%{singgopath} 88 89 # Not all of these parameters currently have an effect, but they might be 90 # used someday. They are the same parameters as in the configure macro. 91 ./mconfig -V %{version}-%{release} \ 92 --prefix=%{_prefix} \ 93 --exec-prefix=%{_exec_prefix} \ 94 --bindir=%{_bindir} \ 95 --sbindir=%{_sbindir} \ 96 --sysconfdir=%{_sysconfdir} \ 97 --datadir=%{_datadir} \ 98 --includedir=%{_includedir} \ 99 --libdir=%{_libdir} \ 100 --libexecdir=%{_libexecdir} \ 101 --localstatedir=%{_localstatedir} \ 102 --sharedstatedir=%{_sharedstatedir} \ 103 --mandir=%{_mandir} \ 104 --infodir=%{_infodir} 105 106 cd builddir 107 make old_config= 108 109 %install 110 cd %{name}-%{version} 111 112 export GOPATH=$PWD/gopath 113 export PATH=$GOPATH/bin:$PATH 114 cd $GOPATH/%{singgopath}/builddir 115 116 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 117 make DESTDIR=$RPM_BUILD_ROOT install man 118 chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/singularity/actions/* 119 120 %files 121 %attr(4755, root, root) %{_libexecdir}/singularity/bin/starter-suid 122 %{_bindir}/* 123 %dir %{_libexecdir}/singularity 124 %{_libexecdir}/singularity/bin/starter 125 %{_libexecdir}/singularity/cni/* 126 %dir %{_sysconfdir}/singularity 127 %config(noreplace) %{_sysconfdir}/singularity/* 128 %attr(755, root, root) %{_sysconfdir}/singularity/actions/exec 129 %attr(755, root, root) %{_sysconfdir}/singularity/actions/run 130 %attr(755, root, root) %{_sysconfdir}/singularity/actions/shell 131 %attr(755, root, root) %{_sysconfdir}/singularity/actions/start 132 %attr(755, root, root) %{_sysconfdir}/singularity/actions/test 133 %dir %{_sysconfdir}/bash_completion.d 134 %{_sysconfdir}/bash_completion.d/* 135 %dir %{_localstatedir}/singularity 136 %dir %{_localstatedir}/singularity/mnt 137 %dir %{_localstatedir}/singularity/mnt/session 138 # XXX: Not great since we can't control this location... 139 %{_mandir}/man1/* 140 141 142 %changelog 143