code: def collectintargz(target, source, env):
      
      # the rpm tool depends on a source package, until this is changed
      # this hack needs to be here that tries to pack all sources in.
      sources = env.FindSourceFiles()
  
      # filter out the target we are building the source list for.
      sources = [s for s in sources if s not in target]
  
      # find the .spec file for rpm and add it since it is not necessarily found
      # by the FindSourceFiles function.
      sources.extend( [s for s in source if str(s).rfind('.spec')!=-1] )
      # sort to keep sources from changing order across builds
      sources.sort()
  
      # as the source contains the url of the source package this rpm package
      # is built from, we extract the target name
      tarball = (str(target[0])+".tar.gz").replace('.rpm', '')
      try:
          tarball = env['SOURCE_URL'].split('/')[-1]
      except KeyError as e:
          raise SCons.Errors.UserError( "Missing PackageTag '%s' for RPM packager" % e.args[0] )
  
      tarball = src_targz.package(env, source=sources, target=tarball,
                                  PACKAGEROOT=env['PACKAGEROOT'], )
  
      return (target, tarball)
docs: Puts all source files into a tar.gz file.