[package]
name = "mp3rgain"
version = "2.6.3"
edition = "2021"
authors = ["Jesse Pinkman <M-Igashi@users.noreply.github.com>"]
description = "Lossless MP3 volume adjustment - a modern mp3gain replacement written in Rust"
license = "MIT"
repository = "https://github.com/M-Igashi/mp3rgain"
homepage = "https://github.com/M-Igashi/mp3rgain"
readme = "README.md"
keywords = ["mp3", "audio", "gain", "volume", "lossless"]
categories = ["multimedia::audio", "command-line-utilities"]
exclude = ["mp3rgui/", "target/", "packages/", "docs/", "scripts/", ".github/", ".claude/", "tests/", "CLAUDE.md", "REPLY_DRAFT.md"]

[features]
default = ["replaygain", "aac"]
replaygain = ["symphonia"]
aac = ["symphonia-aac"]
symphonia-aac = ["symphonia"]
serde = []

[dependencies]
anyhow = "1.0"
thiserror = "2.0"
colored = "3.1"
symphonia = { version = "0.6.0", optional = true, default-features = false, features = ["mp3", "aac", "isomp4", "all-meta"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
id3 = "1"
indicatif = "0.18"
rayon = "1.10"

[lib]
name = "mp3rgain"
path = "src/lib.rs"

[[bin]]
name = "mp3rgain"
path = "src/main.rs"
required-features = ["replaygain", "aac"]

[profile.release]
lto = "thin"
codegen-units = 1
strip = "debuginfo"

[package.metadata.deb]
maintainer = "M-Igashi <M-Igashi@users.noreply.github.com>"
copyright = "2025, M-Igashi"
license-file = ["LICENSE", "0"]
extended-description = """\
mp3rgain is a modern, memory-safe replacement for the classic mp3gain tool, \
written in Rust. It adjusts MP3 volume without re-encoding by modifying the \
global_gain field in each frame's side information, preserving audio quality \
while achieving permanent volume changes.

Features:
 * Lossless and reversible volume adjustment
 * ReplayGain track and album analysis
 * Full command-line compatibility with original mp3gain
 * Support for MP3, AAC/M4A formats
 * Memory-safe implementation (addresses CVE-2021-34085, CVE-2019-18359)"""
section = "sound"
priority = "optional"
depends = "$auto"
assets = [
    ["target/release/mp3rgain", "usr/bin/", "755"],
    ["docs/man/mp3rgain.1", "usr/share/man/man1/", "644"],
    ["README.md", "usr/share/doc/mp3rgain/README.md", "644"],
    ["LICENSE", "usr/share/doc/mp3rgain/copyright", "644"],
]
