summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-28 19:25:31 +0100
committerdavidovski <david@davidovski.xyz>2022-05-28 19:25:31 +0100
commitb4febcfcb6432583e63004cfdd452d2714288844 (patch)
tree620a6e8ce897744e1f24d97d2e47d5bc92f22a84
parent6e0fd4047f5dbc3bff3c54b4b7fd016d343d3b1d (diff)
added revision number to the pkginfo
-rw-r--r--xi_profile.sh2
-rw-r--r--xibuild.sh18
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}"