def read_file(path):
    """
    Read an APKBUILD file

    :param path: full path to the APKBUILD
    :returns: contents of an APKBUILD as a list of strings
    """
    with open(path, encoding='utf-8') as handle:
        lines = handle.readlines()
        if handle.newlines != '\n':
            raise RuntimeError('Wrong line endings in APKBUILD: ' + path)
    return lines
