import re


def is_string_valid_tarball_unpack_directory_name(dirname: str, package_name: str, version_number: str) -> bool:
    """
    Check if the folder obtained by unpacking the source tarball is compliant
    with debian packaging

    :param dirname: directory to check
    :param package_name: name of the source package name
    :param version_number: name of the version
    :return: True if the directory obtained by unpacking the tarball has a valid name, false otherwise
    """

    m = re.match(r"^(?P<name>[a-z0-9\-]+)-(?P<version>[a-z0-9\.\-]+)$", dirname)
    if m is None:
        return False
    if m.group("name") != package_name:
        return False
    if m.group("version") != version_number:
        return False
    return True