Source: maildigest
Section: mail
Priority: optional
Maintainer: Samuel Krapf <samukrapf@gmail.com>
Build-Depends: debhelper-compat (= 13),
               dh-python,
               pybuild-plugin-pyproject,
               python3-all,
               python3-hatchling,
Standards-Version: 4.7.0
Homepage: https://github.com/kpafi/maildigest
Rules-Requires-Root: no

# The dependencies below are spelled out because dh_python3 does not carry them
# over from pyproject.toml faithfully, and fails silently when it cannot:
#
#   * python3-pdfminer -- dh_python3 cannot map the dist name pdfminer.six to it
#     and drops the dependency without failing the build. Nothing notices,
#     because pdfminer is imported lazily inside a subprocess
#     (sanitize/extract_pdf.py): the program starts fine and PDF extraction is
#     simply dead on the user's machine.
#   * the lower bounds -- dh_python3 emits unversioned dependencies even where
#     pyproject.toml states a minimum. Without them apt installs the package on
#     Ubuntu 24.04, whose pydantic 1.10 the code cannot use, and the program
#     falls apart at start-up instead of never being installed.
#
# ${python3:Depends} still contributes the same names unversioned; apt applies
# both relations, so the stricter one wins.
#
# Only for `maildigest selfhost-mail` (F-ING-4, ADR-089): that command generates a
# Postfix/Dovecot configuration for a self-hosted mirror mailbox and checks the result
# over the network. It runs without any of these -- they are needed on the machine that
# is to host the mailbox, not by MailDigest -- so they stay Suggests. python3-dnspython
# is an optional import for the MX check; without it the check reports "skipped".
Package: maildigest
Architecture: all
Depends: ${python3:Depends},
         ${misc:Depends},
         python3-pdfminer,
         python3-pydantic (>= 2),
         python3-imap-tools (>= 1.0),
Suggests: postfix,
          dovecot-imapd,
          dovecot-lmtpd,
          certbot,
          python3-dnspython,
Description: summarises mail from a mirror mailbox into text-only digests
 MailDigest reads a mirror mailbox over IMAP, strips every message down to plain
 text, filters it by importance, checks it for phishing traits and delivers a
 text-only digest to a messenger such as Telegram or Discord.
 .
 Nothing that arrives by mail is ever rendered, executed or followed: HTML is
 converted to text, attachments are read only as text, links are shown as bare
 strings and the digest itself is plain text. A language model is optional --
 without one MailDigest still delivers a labelled extract and every
 deterministic warning.
