def METHOD_NAME(srcdir, config, pkg_name):
    """Scan the project directory for things we can use to guess a description and summary."""
    targets = ["copyright",
               "copyright.txt",
               "apache-2.0",
               "artistic.txt",
               "libcurllicense",
               "gpl.txt",
               "gpl2.txt",
               "gplv2.txt",
               "notice",
               "copyrights",
               "about_bsd.txt"]
    # look for files that start with copying or licen[cs]e (but are
    # not likely scripts) or end with licen[cs]e
    target_pat = re.compile(r"^((copying)|(licen[cs]e)|(e[dp]l-v\d+))|(licen[cs]e)(\.(txt|xml))?$")
    for dirpath, dirnames, files in os.walk(srcdir):
        for name in files:
            if name.lower() in targets or target_pat.search(name.lower()):
                license_from_copying_hash(os.path.join(dirpath, name),
                                          srcdir, config, pkg_name)
            # Also search for license texts in project trees that are
            # REUSE-compliant, or are in process of adopting this standard (for
            # example, KDE ecosystem packages). See https://reuse.software for
            # details. At a basic level, this layout requires a toplevel
            # `LICENSES` directory that includes separate files (with .txt
            # extension) for each license text that covers source code, data,
            # etc elsewhere in the project tree. A variant layout is currently
            # seen in the DPDK 20.11.3 tree, where the `LICENSES` directory is
            # named `license` instead.
            dirbase = os.path.basename(dirpath)
            if re.search(r'^(LICENSES|license)$', dirbase) and re.search(r'\.txt$', name):
                license_from_copying_hash(os.path.join(dirpath, name),
                                          srcdir, config, pkg_name)
    if not licenses:
        print_fatal(" Cannot find any license or a valid {}.license file!\n".format(pkg_name))
        sys.exit(1)
    print("Licenses    : ", " ".join(sorted(licenses)))