From acdc9e13ddc6c6364c1b0444e8b79c21e08a317b Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 13 Jun 2024 14:45:23 +0200 Subject: [PATCH] recipe for 7z added --- recipes/120-7z | 31 +++++++++++++++++++++++++++++++ recipes/librecipes.bash | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100755 recipes/120-7z diff --git a/recipes/120-7z b/recipes/120-7z new file mode 100755 index 0000000..1c92d5c --- /dev/null +++ b/recipes/120-7z @@ -0,0 +1,31 @@ +#!/bin/bash +# +# https://www.gnu.org/software/findutils/ +# +P=7z +V=${SEVENZ_VERSION:-24.05} +FNAME="$P-$V.tar.xz" +DOWNLOAD_URL="https://github.com/ip7z/7zip/releases/download/$V/7z${V//.}-src.tar.xz" + +strip_components=0 +#--- +source "$(dirname "$0")/librecipes.bash" + +#--- +# configure +mkdir -p "${SRC_DIR}" && cd "$_" || exit ${PB_ERR_SYSTEM} +cd 'CPP/7zip/Bundles/Alone2' + +#--- +# compile & install +make -j -f ../../cmpl_gcc.mak +cp b/g/7zz "${PREFIX}/${UTILBIN_DIR}" + +#--- +# post-install + +#--- +# Local Variables: +# mode: shell-script-mode +# sh-basic-offset: 8 +# End: diff --git a/recipes/librecipes.bash b/recipes/librecipes.bash index 3cb0c62..a8310ed 100644 --- a/recipes/librecipes.bash +++ b/recipes/librecipes.bash @@ -79,10 +79,11 @@ trap "pb_exit" EXIT mkdir -p "${DOWNLOADS_DIR}" || exit ${PB_ERR_SYSTEM} test -r "${SRC_FILE}" || curl -L --output "$_" "${DOWNLOAD_URL}" || exit ${PB_ERR_DOWNLOAD} +strip_components="${strip_components:-1}" #--- # unpack mkdir -p "${SRC_DIR}" && cd "$_" || exit ${PB_ERR_SYSTEM} -tar --directory "${SRC_DIR}" --strip-components 1 -xv -f "${SRC_FILE}" || exit ${PB_ERR_UNTAR} +tar --directory "${SRC_DIR}" --strip-components ${strip_components} -xv -f "${SRC_FILE}" || exit ${PB_ERR_UNTAR} #--- # Local Variables: