Format the code, add fmt and check targets
Some checks failed
Makefile CI / build (push) Has been cancelled

This commit is contained in:
Doncho N. Gunchev 2025-11-30 16:58:57 +02:00
parent 82d22c0bf0
commit 60e62585eb
Signed by: dgunchev
GPG key ID: D30FD19F37E002A9
8 changed files with 188 additions and 162 deletions

View file

@ -3,13 +3,16 @@
set -euo pipefail
shopt -s nullglob dotglob
if [ "$(uname -s)" != "Linux" ]; then echo "This script only works on Linux!" >&2; exit 254; fi
if [ "$(uname -s)" != "Linux" ]; then
echo "This script only works on Linux!" >&2
exit 254
fi
set -x # debug
. /etc/os-release
ARCH="${ARCH:-$(uname -m)}" #
VER="${VER:-${VERSION_ID%%\.*}}" # 8
DIST_PRE="${PLATFORM_ID##*:}" # el8
ARCH="${ARCH:-$(uname -m)}" #
VER="${VER:-${VERSION_ID%%\.*}}" # 9
DIST_PRE="${PLATFORM_ID##*:}" # el9
DIST="${DIST:-${DIST_PRE%%[0-9]*}}" # el
OUT_DIR="/tmp/RPMS"
@ -24,17 +27,20 @@ export LC_TIME="${LANG}"
rm -rf "$OUT_DIR"
mkdir "$OUT_DIR"
# Download all sources and patches.
#spectool -g ./*.spec
#
# Install all build dependencies.
#if [ "$UID" == "0" ]; then
# dnf builddep -y --refresh ./*.spec
# dnf builddep -y --refresh ./*.spec
#fi
# make rpmsrc
# make dist
rpmbuild -ta ./dist/*.tar.xz \
--define "_sourcedir $PWD/dist" \
--define "_srcrpmdir $OUT_DIR" \
--define "_rpmdir $OUT_DIR" \
--define "_sourcedir $PWD/dist" \
--define "_srcrpmdir $OUT_DIR" \
--define "_rpmdir $OUT_DIR"
mv "$OUT_DIR"/*/*.rpm "$OUT_DIR/"
rmdir "$OUT_DIR"/* 2>/dev/null || true