--- bdist_rpm.py 2004-09-15 17:48:09.000000000 +1000 +++ /usr/lib/python2.3/distutils/command/bdist_rpm.py 2004-09-16 10:50:49.000000000 +1000 @@ -123,6 +123,9 @@ # Allow a packager to explicitly force an architecture ('force-arch=', None, "Force an architecture onto the RPM build process"), + + ('source-urlbase=', None, + "Specify the base of the source URL"), ] boolean_options = ['keep-temp', 'use-rpm-opt-flags', 'rpm3-mode'] @@ -175,6 +178,7 @@ self.force_arch = None + self.source_urlbase = '' # initialize_options() @@ -381,13 +385,14 @@ 'Version: %{version}', 'Release: %{release}',]) + source_name='%{name}-%{version}' # XXX yuck! this filename is available from the "sdist" command, # but only after it has run: and we create the spec file before # running "sdist", in case of --spec-only. + source_ext='tar.gz' if self.use_bzip2: - spec_file.append('Source0: %{name}-%{version}.tar.bz2') - else: - spec_file.append('Source0: %{name}-%{version}.tar.gz') + source_ext='tar.bz2' + spec_file.append('Source0: %s/%s.%s' % (self.source_urlbase, source_name, source_ext)) spec_file.extend([ 'License: ' + self.distribution.get_license(),