[package]
name = "pkgcheck"
version = "3.3.0"
authors = ["Manfred Lotz <[email protected]>"]
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"
lto = true

[dependencies]
blake3 = "1.8"
clap = { version = "4", features = ["derive"] }
clap_complete = "4"
clap_complete_nushell = "4.5"
colored = "3"
config = "0.15"
escargot = "0.5"
fern = "0.7"
glob = "0.3"
home = "0.5"
once_cell = "1.21"
#lazy_static = "1"
linkify = "0.10"
log = "0.4"
num_cpus = "1"
## openssl-probe = "0.1.5"
pest = "2.8"
pest_derive = "2.8"
regex = "1"
reqwest = { version = "0.12", default-features = false, features = ["blocking", "gzip", "rustls-tls"] }
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 = "4", default-features = false, features = ["deflate"] }
anyhow = "1"
lopdf = "0.36.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" }
]