def make_nvr(nvrea_dict, add_epoch=False, force_epoch=False):
    """Make [E:]N-V-R from a nvrea dictionary.

    @param nvrea_dict: {name, version, release, epoch}
    @type nvrea_dict: dict
    @param add_epoch: add epoch to the result
    @type add_epoch: bool
    @return: N-[E:]V-R string
    @rtype str
    """
    if add_epoch or force_epoch:
        epoch = nvrea_dict.get('epoch', None)
        epoch = epoch or 0
        epoch = int(epoch)
        if epoch or force_epoch:
            epoch = '%s:' % epoch
        else:
            epoch = ''
    else:
        epoch = ''
    return '%s-%s%s-%s' % (nvrea_dict['name'], epoch, nvrea_dict['version'],
        nvrea_dict['release'])
