summaryrefslogtreecommitdiffstats
path: root/src/fedpkg.py
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2011-03-21 18:13:55 +0100
committerHans Ulrich Niedermann <hun@n-dimensional.de>2011-03-21 18:13:55 +0100
commit6c156ba682675a5f44a9dc2c22af638db1677708 (patch)
treec5ddc26fe27b6fe9d09b9bdfe60c8b016922138c /src/fedpkg.py
parent540bd77ac2959471c0aa6f6f278e718aacad966b (diff)
downloadfedora-packager-rpmbuild-option-passthrough.tar.gz
fedora-packager-rpmbuild-option-passthrough.tar.xz
fedora-packager-rpmbuild-option-passthrough.zip
Implement rpmbuild options: --define --with --withoutrpmbuild-option-passthrough
Implement the following global fedpkg options for passing on to rpmbuild, regardless of whether fedpkg is directly calling rpmbuild or calling it indirectly via mock: -D 'MACRO EXPR', --define 'MACRO EXPR' define an rpm macro for rpmbuild and mock --with RPMWITH enable configure option for rpmbuild and mock --without RPMWITHOUT disable configure option for rpmbuild and mock
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-xsrc/fedpkg.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py
index 475b538..83dbc7a 100755
--- a/src/fedpkg.py
+++ b/src/fedpkg.py
@@ -880,6 +880,17 @@ def parse_cmdline(generate_manpage = False):
# Let somebody override the username found in fedora cert
parser.add_argument('-u', '--user',
help = "Override the username found in the fedora cert")
+ # Let the user define rpm macros (similar to mock)
+ parser.add_argument('-D', '--define', action = 'append', default = [],
+ dest = 'rpmmacros', metavar = "'MACRO EXPR'",
+ help = "define an rpm macro for rpmbuild")
+ # Let the user add --with/--without args for rpmbuild (similar to mock)
+ parser.add_argument('--with', action = 'append', default = [],
+ dest = 'rpmwith',
+ help = "enable configure option for rpmbuild")
+ parser.add_argument('--without', action = 'append', default = [],
+ dest = 'rpmwithout',
+ help = "disable configure option for rpmbuild")
# Let the user define which path to look at instead of pwd
parser.add_argument('--path', default = None,
help='Directory to interact with instead of current dir')