Skip to content

Commit

Permalink
BUILD/RPM: enable optional build rpm with debug function
Browse files Browse the repository at this point in the history
Signed-off-by: Changcheng Liu <jerrliu@nvidia.com>
  • Loading branch information
changchengx committed Nov 8, 2021
1 parent 644cdae commit 48637c2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contrib/buildrpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ rpmopts="--buildroot='${WS}/_rpm'"
opt_tarball=0
opt_srcrpm=0
opt_binrpm=0
opt_dbgrpm=0
opt_no_dist=0
opt_no_deps=0
defines=""
Expand All @@ -21,6 +22,7 @@ while test "$1" != ""; do
--tarball|-t) opt_tarball=1 ;;
--srcrpm|-s) opt_srcrpm=1 ;;
--binrpm|-b) opt_binrpm=1 ;;
--dbgrpm|-d) opt_dbgrpm=1 ;;
--no-dist) opt_no_dist=1 ;;
--nodeps) opt_no_deps=1 ;;
--define|-d) defines="$defines --define '$2'"; shift ;;
Expand All @@ -33,6 +35,7 @@ Valid arguments:
--tarball|-t Create tarball
--srcrpm|-s Create src.rpm
--binrpm|-b Create bin.rpm
-dbgrpm|-d Create bin.rpm with debug function
--no-dist Undefine %{dist} tag
--nodeps Ignore build-time dependencies
--define|-d <arg> Add a define to rpmbuild
Expand All @@ -49,6 +52,10 @@ if [ $opt_no_dist -eq 1 ]; then
rpmmacros="$rpmmacros '--undefine=dist'"
fi

if [ $opt_dbgrpm -eq 1 ]; then
rpmmacros="--define 'devel 1' ${rpmmacros}"
fi

if [ $opt_no_deps -eq 1 ]; then
rpmopts="$rpmopts --nodeps"
fi
Expand Down

0 comments on commit 48637c2

Please sign in to comment.