mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 20:40:21 +01:00
contrib/rpm: add option to only building SRPM
Set environment variable BUILDTYPE=SRPM or call `build_clean.sh --srpm`. Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
3e3e54a56c
commit
b1e26735a0
2 changed files with 15 additions and 2 deletions
|
|
@ -116,7 +116,16 @@ sed -e "/^__CHANGELOG__$/ \
|
|||
d
|
||||
}" > "$TEMPSPEC" || die "Error reading spec file"
|
||||
|
||||
rpmbuild --define "_topdir $TEMP" -ba "$TEMPSPEC" || die "ERROR: rpmbuild FAILED"
|
||||
case "$BUILDTYPE" in
|
||||
"SRPM")
|
||||
RPM_BUILD_OPTION=-bs
|
||||
;;
|
||||
*)
|
||||
RPM_BUILD_OPTION=-ba
|
||||
;;
|
||||
esac
|
||||
|
||||
rpmbuild --define "_topdir $TEMP" $RPM_BUILD_OPTION "$TEMPSPEC" || die "ERROR: rpmbuild FAILED"
|
||||
|
||||
ln -snf "$TEMPBASE" ./latest
|
||||
TEMP_LATEST="$(readlink -f .)"/latest
|
||||
|
|
@ -128,6 +137,6 @@ LOG
|
|||
LOG "See \"$TEMP_LATEST/\" which symlinks to \"$TEMPBASE\""
|
||||
LOG
|
||||
LOG "Result:"
|
||||
ls -dla "$TEMP_LATEST" "$(dirname "$TEMP_LATEST")/$TEMPBASE/" "$TEMP_LATEST"/RPMS/*/ "$TEMP_LATEST"/RPMS/*/*.rpm "$TEMP_LATEST"/SRPMS/ "$TEMP_LATEST"/SRPMS/*.rpm | sed 's/^/ /'
|
||||
ls -dla "$TEMP_LATEST" "$(dirname "$TEMP_LATEST")/$TEMPBASE/" "$TEMP_LATEST"/RPMS/*/ "$TEMP_LATEST"/RPMS/*/*.rpm "$TEMP_LATEST"/SRPMS/ "$TEMP_LATEST"/SRPMS/*.rpm 2>/dev/null | sed 's/^/ /'
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ usage() {
|
|||
echo " --force: force build, even if working directory is not clean and has local modifications"
|
||||
echo " --clean: run \`git-clean -fdx :/\` before build"
|
||||
echo " --quick: only run \`make dist\` instead of \`make distcheck\`"
|
||||
echo " --srpm: only build the SRPM"
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -46,6 +47,9 @@ for A; do
|
|||
-Q|--quick)
|
||||
QUICK=1
|
||||
;;
|
||||
-S|--srpm)
|
||||
BUILDTYPE=SRPM
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
die "Unexpected argument \"$A\""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue