Added rpmdefines putting the srpm and rpm in topdir

In rpkg the `build --srpm` command is hard coded to expect the generated
srpm in the toplevel directory.
This commit is contained in:
Brian Stinson 2014-09-20 19:30:33 -05:00
parent 4e21f32dd4
commit d653abe2a5

View file

@ -52,6 +52,8 @@ class Commands(pyrpkg.Commands):
self._distval = self._distval.replace('.', '_') self._distval = self._distval.replace('.', '_')
self._disttag = 'el%s' % self._distval self._disttag = 'el%s' % self._distval
self._rpmdefines = ["--define '_topdir {0}'".format(self.path), self._rpmdefines = ["--define '_topdir {0}'".format(self.path),
"--define '_srcrpmdir {0}'".format(self.path),
"--define '_rpmdir {0}'".format(self.path),
"--define 'dist .{0}'".format(self._disttag), "--define 'dist .{0}'".format(self._disttag),
# int and float this to remove the decimal # int and float this to remove the decimal
"--define '{0} 1'".format(self._disttag)] "--define '{0} 1'".format(self._disttag)]