#!/usr/bin/env bash FROMFEDORA='36' PACKAGE='msmtp' GETTEXT_FC='36' GETTEXT_VERSION='0.21-9' ABSDIR="$( dirname "$(readlink -f -- "$0")" )" cd ${ABSDIR} type -P docker >/dev/null && DOCKER=$(which docker) type -P podman >/dev/null && DOCKER=$(which podman) if ! JSONLINE=$(curl -s https://src.fedoraproject.org/_dg/bodhi_updates/rpms/${PACKAGE} | grep -e "fc${FROMFEDORA}\","); then echo "ERROR : No ${PACKAGE} release available for Fedora ${FROMFEDORA}" echo "Please check https://src.fedoraproject.org/rpms/${PACKAGE} to choose the right release." exit 1 fi VERSION=$(echo "${JSONLINE}" | sed -e "s/^\s*\"stable\": \"${PACKAGE}-\(.*\)\.fc${FROMFEDORA}\",\s*$/\1/") ARCH=$(${DOCKER} run --rm docker.io/library/rockylinux:8 uname -i) mkdir /tmp/dockerrpmbuild-$$ ${DOCKER} run -i --rm -v /tmp/dockerrpmbuild-$$:/out:Z --privileged docker.io/library/rockylinux:8 <