summaryrefslogtreecommitdiffstats
path: root/src/pyfedpkg/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/pyfedpkg/__init__.py')
-rw-r--r--src/pyfedpkg/__init__.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 92bc7df..cd43498 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -1198,6 +1198,10 @@ class PackageModule:
"--define 'dist .%s'" % self.dist,
"--define '%s %s'" % (self.distvar, self.distval),
"--define '%s 1'" % self.dist]
+ self.rpmbuildopts = (
+ [ ( "--define '%s'" % x) for x in args.rpmmacros] +
+ [ ( "--with '%s'" % x) for x in args.rpmwith ] +
+ [ ("--without '%s'" % x) for x in args.rpmwithout ])
try:
self.ver = self.getver()
self.rel = self.getrel()
@@ -1393,6 +1397,7 @@ class PackageModule:
# setup the rpm command
cmd = ['rpmbuild']
cmd.extend(self.rpmdefines)
+ cmd.extend(self.rpmbuildopts)
if arch:
cmd.extend(['--target', arch])
if short:
@@ -1565,6 +1570,7 @@ class PackageModule:
# setup the rpm command
cmd = ['rpmbuild']
cmd.extend(self.rpmdefines)
+ cmd.extend(self.rpmbuildopts)
if arch:
cmd.extend(['--target', arch])
if short:
@@ -1622,6 +1628,7 @@ class PackageModule:
# build up the rpm command
cmd = ['rpmbuild']
cmd.extend(self.rpmdefines)
+ cmd.extend(self.rpmbuildopts)
# This may need to get updated if we ever change our checksum default
if not hashtype == 'sha256':
cmd.extend(["--define '_source_filedigest_algorithm %s'" % hashtype,
@@ -1646,6 +1653,7 @@ class PackageModule:
# setup the command
cmd = ['mock']
cmd.extend(mockargs)
+ cmd.extend(self.rpmbuildopts)
cmd.extend(['-r', self.mockconfig, '--resultdir',
os.path.join(self.path, self.module, self.ver, self.rel),
'--rebuild', self.srpmname])
@@ -1792,6 +1800,7 @@ class PackageModule:
# setup the rpm command
cmd = ['rpmbuild']
cmd.extend(self.rpmdefines)
+ cmd.extend(self.rpmbuildopts)
if arch:
cmd.extend(['--target', arch])
cmd.extend(['--nodeps', '-bp', os.path.join(self.path, self.spec)])
@@ -1815,6 +1824,7 @@ class PackageModule:
cmd = ['rpmbuild']
cmd.extend(self.rpmdefines)
+ cmd.extend(self.rpmbuildopts)
# Figure out which hashtype to use, if not provided one
if not hashtype:
hashtype = self.hashtype
@@ -1853,6 +1863,7 @@ class PackageModule:
# setup the rpm command
cmd = ['rpmbuild']
cmd.extend(self.rpmdefines)
+ cmd.extend(self.rpmbuildopts)
cmd.extend(['-bl', os.path.join(self.path, self.spec)])
# Run the command
_run_command(cmd, shell=True)