[package]
name = "pkgcheck"
version = "4.0.3"
authors = ["Manfred Lotz <manfred@ctan.org>"]
description = "Command-line tool to check packages uploaded to CTAN."
license = "MIT/Apache-2.0"
readme = "README.md"
edition = "2024"

[[bin]]
name = "pkgcheck"

# with this option binaries are smaller
# https://doc.rust-lang.org/edition-guide/rust-2018/error-handling-and-panics/aborting-on-panic.html
[profile.release]
panic = "abort"
strip = "symbols"
lto = true

[dependencies]
blake3 = "1.8"
clap = { version = "4", features = ["derive"] }
clap_complete = { version = "4", features = ["unstable-dynamic"] }
clap_complete_nushell = "4.6"
colored = "3"
config = "0.15"
escargot = "0.5"
fern = "0.7"
glob = "0.3"
home = "0.5"
infer = "0.19"
# no longer used as we use std::sync::LazyLock;
#once_cell = "1.21"
linkify = "0.11"
log = "0.4"
nom = "8"
num_cpus = "1"
## openssl-probe = "0.1.5"
regex = "1"
reqwest = { version = "0.13.3", default-features = false, features = [
  "blocking",
  "gzip",
  "rustls",
] }
rustc-hash = "2.1"
scoped_threadpool = "0.1"
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9"
tempfile = "3"
threadpool = "1.8"
tokio = { version = "1", features = ["full"] }
unbytify = "0.2"
unicode-bom = "2"
url = "2.5"
walkdir = "2.5"
zip = { version = "8", default-features = false, features = ["deflate"] }
anyhow = "1"
lopdf = "0.40.0"

[dev-dependencies]
assert_cmd = "2"
predicates = "3"

[package.metadata.deb]
section = "utility"
depends = ""
priority = "optional"
assets = [
  [
    # we have to use "target/release/pkgcheck" even when using e.g. musl
    # see also at DEB target in Makefile
    "target/release/pkgcheck",
    "usr/bin/",
    "755",
  ],
  ["LICENSE-MIT", "usr/share/doc/pkgcheck/", "644"],
  ["LICENSE-APACHE", "usr/share/doc/pkgcheck/", "644"],
  ["README.md", "usr/share/doc/pkgcheck/README", "644"],
  ["docs/pkgcheck.pdf", "usr/share/doc/pkgcheck/pkgcheck.pdf", "644"],
]
extended-description = """\
A checker for uploaded packages to CTAN
"""

changelog = "CHANGES.md"


[package.metadata.generate-rpm]
assets = [
  { source = "target/release/pkgcheck", dest = "/usr/bin/", mode = "755" },
  { source = "LICENSE-MIT", dest = "/usr/share/doc/pkgcheck/", mode = "644" },
  { source = "LICENSE-APACHE", dest = "/usr/share/doc/pkgcheck/", mode = "644" },
  { source = "README.md", dest = "/usr/share/doc/pkgcheck/", mode = "644" },
  { source = "docs/pkgcheck.pdf", dest = "/usr/share/doc/pkgcheck/", mode = "644" },
]
