tog-pegasus/pegasus_rpm_build_env.sh
DistroBaker 081267dc43 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/tog-pegasus.git#6e556193473e062db027bdb29c0ffc2cbfb5e7c4
2020-12-16 23:01:21 +00:00

70 lines
2.0 KiB
Bash

# pegasus_rpm_build_env.sh:
#
# Open Pegasus RPM %build + %install environment setup.
#
# Expects these variables to be set on entry:
# RPM_ARCH : rpmbuild architecture identifier
# RPM_OPT_FLAGS : rpmbuild compile options
# RPM_BUILD_DIR : rpmbuild source directory
# RPM_BUILD_ROOT: rpmbuild build destination directory
# RPM_ARCH_LIB : %{_lib} : lib or lib64
# SRCNAME : name of pegasus source directory
#
# compile options:
#
export PEGASUS_EXTRA_C_FLAGS="$RPM_OPT_FLAGS -Wno-unused"
export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS"
export PEGASUS_EXTRA_PROGRAM_LINK_FLAGS="-pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack"
export SYS_INCLUDES=-I/usr/kerberos/include
#
# build object directories:
#
SRCNAME=${SRCNAME:-pegasus}
export PEGASUS_ROOT=${RPM_BUILD_DIR}/${SRCNAME}
export PEGASUS_HOME=${RPM_BUILD_DIR}/${SRCNAME}/build
#
# build time settings:
export PEGASUS_ARCH_LIB=${RPM_ARCH_LIB:-lib}
export PEGASUS_ENVVAR_FILE=${PEGASUS_ROOT}/env_var_Linux.status
export OPENSSL_HOME=/usr
export OPENSSL_BIN=/usr/bin
export LD_LIBRARY_PATH=${PEGASUS_HOME}/lib
export PATH=${PEGASUS_HOME}/bin:${PATH}
#
# PEGASUS_PLATFORM (hardware platform) setup:
#
if [ -z "$RPM_ARCH" ]; then
export RPM_ARCH=`/bin/uname -i`;
fi;
case ${RPM_ARCH} in
ia64)
export PEGASUS_PLATFORM=LINUX_IA64_GNU;
;;
x86_64)
export PEGASUS_PLATFORM=LINUX_X86_64_GNU;
;;
ppc)
export PEGASUS_PLATFORM=LINUX_PPC_GNU;
;;
ppc64|ppc64le|pseries)
export PEGASUS_PLATFORM=LINUX_PPC64_GNU;
;;
s390)
export PEGASUS_PLATFORM=LINUX_ZSERIES_GNU;
export PEGASUS_EXTRA_C_FLAGS="$PEGASUS_EXTRA_C_FLAGS -fsigned-char";
export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS";
;;
s390x|zseries)
export PEGASUS_PLATFORM=LINUX_ZSERIES64_GNU;
export PEGASUS_EXTRA_C_FLAGS="$PEGASUS_EXTRA_C_FLAGS -fsigned-char";
export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS";
;;
i386)
export PEGASUS_PLATFORM=LINUX_IX86_GNU
;;
*)
echo "Architecture unsupported by pegasus: $RPM_ARCH";
exit 1;
;;
esac;