Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > b0f3e15791a0ac38af44f6d4fa8cf8da > files > 16

gcc-5.5.0-1.mga6.src.rpm

#!/bin/sh
RPM_TOP_DIR=${RPM_TOP_DIR=$(rpm --eval %_topdir)}

CROSS=cross
[[ "$1" = "--bootstrap" ]] && { shift; CROSS=cross_bootstrap; }

specfile=$1
[[ -z "$specfile" ]] && { echo "ERROR: undefined specfile"; exit 1; }

ARCH=$2
[[ -z "$ARCH" ]] && { echo "ERROR: undefined architecture"; exit 1; }

SPECFILE=$RPM_TOP_DIR/SPECS/cross-$ARCH-$specfile
cat - $specfile > $SPECFILE << EOF
##
## This a generated specfile from ${specfile##*/}
##
%define $CROSS $ARCH
##
EOF