diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2020-06-04 18:21:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 18:21:34 -0400 |
commit | f76fed00c9c9289b354e7f8dd6f14ea699ef16a2 (patch) | |
tree | f78be5fa8c4de8657798cc8f63f4497930c8e16b /scripts/spmbuild | |
parent | 65934ab40dfba9be3c0d6cb535f4243e25920711 (diff) | |
download | spmc-f76fed00c9c9289b354e7f8dd6f14ea699ef16a2.tar.gz |
Bsdtar (#42)
* Add docker build image
* Use bsdtar
* Disable ORIGIN
* tar is bsdtar
* Use absolute rpath
* Replace matched path with destroot+libpath
* No RPATH recieves a likely default path
* Use RPATH not RUNPATH
* Add bsdtar to circleci deps
* Replace tar references
Diffstat (limited to 'scripts/spmbuild')
-rwxr-xr-x | scripts/spmbuild | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/scripts/spmbuild b/scripts/spmbuild index 5bdcf3d..17f4e21 100755 --- a/scripts/spmbuild +++ b/scripts/spmbuild @@ -42,10 +42,7 @@ function msg_warn() { } function tar() { - local cmd=tar - if [[ $(uname -s) == Darwin ]]; then - cmd=gtar - fi + local cmd=bsdtar $cmd "$@" } @@ -348,15 +345,14 @@ summary=${summary:-*} function spm_build_mkfilelist() { local filename="${1}" + if [[ -z ${filename} ]]; then msg_error "spmbuild_mkfilelist requires an output filename" exit 1 fi - pushd "${pathname}" - echo "# SPM PACKAGE FILE LIST" > "${filename}" - find . -type f -not -name ".SPM_*" >> "${filename}" - popd + echo "# SPM PACKAGE FILE LIST" > "${filename}" + find . -type f -not -name ".SPM_*" >> "${filename}" } function prepare() { @@ -389,6 +385,14 @@ function spm_build_do_stage_package() { set +x } +function spm_build_tar() { + local archive="${1}" + bsdtar -c -z -f "${archive}" \ + --exclude '..' \ + --exclude '.' \ + .* * +} + function spm_build_do_stage_archive() { local archive="${1}" @@ -406,7 +410,7 @@ function spm_build_do_stage_archive() { msg2 "Recording paths..." spm_build_mkfilelist "${SPM_META_FILELIST}" msg2 "Archiving files..." - tar --hard-dereference --create --gzip --file "${archive}" --exclude '..' --exclude '.' .* * + spm_build_tar "${archive}" popd popd } @@ -437,9 +441,6 @@ msg "Initializing..." spm_build_initialize_stage1 spm_build_initialize_stage2 # post-runtime activation -#msg2 "Installing build toolchain..." -#spm_build_install binutils gcc - msg2 "Sourcing build script..." source "${SPM_BUILD_SCRIPT_ROOT}/${SPM_BUILD_SCRIPT}" |