Skip to content

Commit

Permalink
[RPM] pass -D params to makerpm script.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal committed Feb 21, 2019
1 parent c5e84bd commit 746a743
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packaging/makesrpm.sh
Expand Up @@ -74,10 +74,18 @@ while test ${#} -ne 0; do
fi
USER_DEFINE="$USER_DEFINE --define \""${2}"\""
shift
elif test x${1} = x-D; then
if test ${#} -lt 2; then
echo "-D parameter needs an argument" 1>&2
exit 1
fi
USER_D="$USER_D -D \""${2}"\""
fi
shift
done

echo "USER_D = $USER_D"

if test $PRINTHELP -eq 1; then
printHelp
exit 0
Expand Down Expand Up @@ -263,6 +271,7 @@ eval "rpmbuild --define \"_topdir $TEMPDIR/rpmbuild\" \
--define \"_source_filedigest_algorithm md5\" \
--define \"_binary_filedigest_algorithm md5\" \
${USER_DEFINE} \
${USER_D} \
-bs $TEMPDIR/xrootd.spec > $TEMPDIR/log"
if test $? -ne 0; then
echo "[!] RPM creation failed" 1>&2
Expand Down

0 comments on commit 746a743

Please sign in to comment.