From b4febcfcb6432583e63004cfdd452d2714288844 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sat, 28 May 2022 19:25:31 +0100 Subject: added revision number to the pkginfo --- xi_profile.sh | 2 +- xibuild.sh | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/xi_profile.sh b/xi_profile.sh index 10a9c9a..93be8f6 100644 --- a/xi_profile.sh +++ b/xi_profile.sh @@ -7,7 +7,7 @@ export MAKEFLAGS=-j$JOBS export SAMUFLAGS=-j$JOBS export CARGO_BUILD_JOBS=$JOBS -export CFLAGS="-Os -fomit-frame-pointer" +export CFLAGS="-pipe -Os -fomit-frame-pointer" export CXXFLAGS="$CFLAGS" export CPPFLAGS="$CFLAGS" export LDFLAGS="-Wl,--as-needed,-O1,--sort-common" diff --git a/xibuild.sh b/xibuild.sh index e20a349..613d737 100644 --- a/xibuild.sh +++ b/xibuild.sh @@ -70,16 +70,11 @@ EOF extract () { f=$1 - case "${f}" in - *".tar"*) - case "${f##*.}" in - "gz" ) tar -zxf $f;; - "lz" ) tar --lzip -xf "$f" ;; - * ) tar -xf $f ;; - esac - ;; - *".tgz" ) tar -xf $f ;; - *".zip" ) unzip -qq -o $f ;; + case "$(file $f)" in + *"gzip"*) tar -zxf $f;; + *"XZ"*) tar -Jxf $f;; + *"bzip2"*) tar -jxf $f;; + *"Zip"*) unzip -qq -o $f ;; esac } @@ -116,7 +111,7 @@ xibuild_fetch () { for url in $ADDITIONAL; do case $url in - http*|ftp*) fetch_source $url;; + *'://'*) fetch_source $url;; *) fetch_source file://$src_dir/$url esac done @@ -187,6 +182,7 @@ xibuild_describe () { echo "PKG_FILE=$name.xipkg" echo "CHECKSUM=$(sha512sum $xipkg | awk '{ print $1 }')" echo "VERSION=$pkg_ver" + echo "REVISION=$(cat ${buildfile%/*}/*.xibuild | sha512sum | cut -d' ' -f1)" echo "SOURCE=$SOURCE" echo "DATE=$(stat -t $xipkg | cut -d' ' -f13 | xargs date -d)" echo "DEPS=${DEPS}" -- cgit v1.2.1