mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-27 10:03:08 +02:00
Merge branch '273-add-recipe-for-7z' into 'master'
Resolve "add recipe for 7z" Closes #273 See merge request Pmodules/src!251
This commit is contained in:
Executable
+31
@@ -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:
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user