webbuild-cgi: support target arch in rpm prepare
This commit is contained in:
parent
d77d29fd37
commit
949a4c35df
@ -1439,10 +1439,12 @@ if [ "$MAINTAINERMODE" != "true" ]; then
|
|||||||
# check for updates
|
# check for updates
|
||||||
echo -n "<input type=button value=\"check for updates\" onclick="
|
echo -n "<input type=button value=\"check for updates\" onclick="
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autospecupdatescheck&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=autospecupdatescheck&"
|
||||||
|
echo -n "RPMBUILDARCH=\"+getSelectedValueById('rpmbuildarch')+\"&"
|
||||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
||||||
# unpack
|
# unpack
|
||||||
echo -n "<input type=button value=\"prepare\" onclick="
|
echo -n "<input type=button value=\"prepare\" onclick="
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=rpmprepare&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&REQUEST=rpmprepare&"
|
||||||
|
echo -n "RPMBUILDARCH=\"+getSelectedValueById('rpmbuildarch')+\"&"
|
||||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue()));>"
|
||||||
# build
|
# build
|
||||||
echo -n "<input type=button value=\"build\" onclick="
|
echo -n "<input type=button value=\"build\" onclick="
|
||||||
@ -1751,7 +1753,11 @@ case $REQUEST in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"autospecupdatescheck") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a2"; RET=$? ;;
|
"autospecupdatescheck") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a2"; RET=$? ;;
|
||||||
"rpmprepare") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "rpmbuild -bp $PACKAGE.spec --nodeps --define=\"_topdir $SPECVAR_WORKINGHOME/RPM\""; RET=$? ;;
|
"rpmprepare") [ "$RPMBUILDARCH" -a "$RPMBUILDARCH" != "${AUTOPORT_ARCH[$ENVIRONMENT]}" ] && \
|
||||||
|
RPMARCHADD="--target $RPMBUILDARCH --define=\"cross_target_cpu $RPMBUILDARCH\""
|
||||||
|
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "rpmbuild -bp $PACKAGE.spec $RPMARCHADD --nodeps --define=\"_topdir $SPECVAR_WORKINGHOME/RPM\""
|
||||||
|
RET=$?
|
||||||
|
;;
|
||||||
"rpmbuild") [ "$RPMFORCE" = "true" ] && RPMFORCEADD="--force-build"
|
"rpmbuild") [ "$RPMFORCE" = "true" ] && RPMFORCEADD="--force-build"
|
||||||
[ "$RPMBUILDARCH" -a "$RPMBUILDARCH" != "${AUTOPORT_ARCH[$ENVIRONMENT]}" ] && \
|
[ "$RPMBUILDARCH" -a "$RPMBUILDARCH" != "${AUTOPORT_ARCH[$ENVIRONMENT]}" ] && \
|
||||||
RPMARCHADD="-A $RPMBUILDARCH --define \"cross_target_cpu=$RPMBUILDARCH\""
|
RPMARCHADD="-A $RPMBUILDARCH --define \"cross_target_cpu=$RPMBUILDARCH\""
|
||||||
|
Loading…
Reference in New Issue
Block a user