mirror of
https://github.com/gwebu-team/profile.d.git
synced 2025-12-09 12:05:46 +00:00
Quick and dirty build with podman on MacOS.
This commit is contained in:
parent
58223f0e8a
commit
b3f0f66356
3 changed files with 65 additions and 0 deletions
40
build.sh
Executable file
40
build.sh
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
shopt -s nullglob dotglob
|
||||
|
||||
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
|
||||
DIST="${DIST:-${DIST_PRE%%[0-9]*}}" # el
|
||||
OUT_DIR="/tmp/RPMS"
|
||||
|
||||
export LANG='en_US.UTF-8'
|
||||
export LANGUAGE="${LANG}"
|
||||
export LC_ALL="${LANG}"
|
||||
export LC_MEASUREMENT="${LANG}"
|
||||
export LC_MONETARY="${LANG}"
|
||||
export LC_NUMERIC="${LANG}"
|
||||
export LC_TIME="${LANG}"
|
||||
|
||||
rm -rf "$OUT_DIR"
|
||||
mkdir "$OUT_DIR"
|
||||
|
||||
#spectool -g ./*.spec
|
||||
#
|
||||
#if [ "$UID" == "0" ]; then
|
||||
# dnf builddep -y --refresh ./*.spec
|
||||
#fi
|
||||
|
||||
# make rpmsrc
|
||||
rpmbuild -ta ./dist/*.tar.xz \
|
||||
--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
|
||||
Loading…
Add table
Add a link
Reference in a new issue