def create_ltp_package(aleph_record, book_id, ebook_fn, data, url,
                       urn_nbn=None):
    """
    Create LTP package as it is specified in specification v1.0 as I understand
    it.

    Args:
        aleph_record (str): XML containing full aleph record.
        book_id (str): UUID of the book.
        ebook_fn (str): Original filename of the ebook.
        data (str/bytes): Ebook's content.
        url (str): URL of the publication used when the URL can't be found in
                   `aleph_record`.
        urn_nbn (str, default None): URN:NBN.

    Returns:
        str: Name of the package's directory in ``/tmp``.
    """
    root_dir, orig_dir, meta_dir = _create_package_hierarchy(book_id=book_id)

    # create original file
    original_fn = os.path.join(
        orig_dir,
        fn_composers.original_fn(book_id, ebook_fn)
    )
    with open(original_fn, "wb") as f:
        f.write(data)

    # create metadata files
    metadata_filenames = []
    records = marcxml2mods(marc_xml=aleph_record, uuid=book_id, url=url)
    for cnt, mods_record in enumerate(records):
        fn = os.path.join(
            meta_dir,
            fn_composers.volume_fn(cnt)
        )

        with open(fn, "w") as f:
            f.write(mods_record)

        metadata_filenames.append(fn)

    # collect md5 sums
    md5_fn = os.path.join(root_dir, fn_composers.checksum_fn(book_id))
    checksums = checksum_generator.generate_hashfile(root_dir)
    with open(md5_fn, "w") as f:
        f.write(checksums)

    # create info file
    info_fn = os.path.join(root_dir, fn_composers.info_fn(book_id))
    with open(info_fn, "w") as f:
        f.write(
            info_composer.compose_info(
                root_dir=root_dir,
                files=[original_fn] + metadata_filenames,
                hash_fn=md5_fn,
                aleph_record=aleph_record,
                urn_nbn=urn_nbn,
            )
        )

    return root_dir
Create LTP package as it is specified in specification v1.0 as I understand
    it.

    Args:
        aleph_record (str): XML containing full aleph record.
        book_id (str): UUID of the book.
        ebook_fn (str): Original filename of the ebook.
        data (str/bytes): Ebook's content.
        url (str): URL of the publication used when the URL can't be found in
                   `aleph_record`.
        urn_nbn (str, default None): URN:NBN.

    Returns:
        str: Name of the package's directory in ``/tmp``.