Get the distribution string for use with rpmbuild and mock

def _get_distset(tgt):
    '''
    Get the distribution string for use with rpmbuild and mock
    '''
    # Centos adds 'centos' string to rpm names, removing that to have
    # consistent naming on Centos and Redhat, and allow for Amazon naming
    tgtattrs = tgt.split('-')
    if tgtattrs[0] == 'amzn':
        distset = '--define "dist .{0}1"'.format(tgtattrs[0])
    elif tgtattrs[1] in ['6', '7']:
        distset = '--define "dist .el{0}"'.format(tgtattrs[1])
    else:
        distset = ''

    return distset