Last active
July 26, 2019 11:46
-
-
Save jose-d/e884c0ab7e89a3ece2229a66f1cb7f6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download singularity: | |
wget https://github.com/sylabs/singularity/releases/download/v3.0.1/singularity-3.0.1.tar.gz | |
# install missing deps | |
yum install git libseccomp-devel | |
# unpack tarball | |
tar -xvf ./singularity-3.0.1.tar.gz | |
# edit specfile - before "description" section insert the prefix: | |
59 #prefix for KOIOS | |
60 %define _prefix /opt/singularity/%{version} | |
61 %define _sysconfdir %{_prefix}/etc | |
62 %define _sharedstatedir %{_prefix}/var/lib | |
63 %define _localstatedir %{_prefix}/var | |
64 | |
65 | |
66 %description | |
67 Singularity provides functionality to make portable | |
# ..and before make DESTDIR .. place mkdir statements to ensure all subdirs in our directory will be present. | |
115 mkdir -p %{_prefix} #create prefix dir | |
116 mkdir -p %{_exec_prefix} | |
117 mkdir -p %{_bindir} | |
118 mkdir -p %{_libexecdir} | |
119 mkdir -p %{_sysconfdir} | |
120 mkdir -p %{_sharedstatedir} | |
121 mkdir -p %{_localstatedir} | |
122 mkdir -p %{_libdir} | |
123 mkdir -p %{_mandir} | |
124 | |
125 mkdir -p $RPM_BUILD_ROOT%{_exec_prefix}/share/man/man1 | |
# and specify our site-specific build suffix to recognize it..: | |
Release: 1%{?dist}.KOIOS | |
# backup the old tar.gz: | |
mv ./singularity-3.0.1.tar.gz ./singularity-3.0.1.tar.gz_orig | |
# and pack updated tar.gz: | |
tar -zcvf ./singularity-3.0.1.tar.gz ./singularity | |
# produce RPM: | |
rpmbuild -tb singularity-3.0.1.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment