[package]
name = "stgit"
version = "2.6.1"
description = "Stack-based patch management for Git"
edition = "2021"
rust-version = "1.85"
authors = [
  "Catalin Marinas <catalin.marinas@gmail.com>",
  "Peter Grayson <pete@jpgrayson.net>",
]
license = "GPL-2.0-only"
homepage = "https://stacked-git.github.io/"
repository = "https://github.com/stacked-git/stgit"
keywords = ["git", "vcs", "cli", "utility"]
categories = ["development-tools"]
exclude = [
  "/.github",
  "Documentation/",
  "/t",
  "/contrib/release",
  "/contrib/wix",
]

[[bin]]
bench = false
path = "src/main.rs"
name = "stg"

[dependencies]
anyhow = "1.0"
anstyle = { version = "1.0", features = ["std"] }
bstr = { version = "1.11", default-features = false, features = ["std"] }
bzip2-rs = "0.1"
clap = { version = "~4.6", default-features = false, features = [
  "color",
  "help",
  "std",
  "string",
  "suggestions",
  "usage",
  "wrap_help",
] }
ctrlc = "3.4"
encoding_rs = "0.8"
flate2 = "1"
gix = { version = "0.84", default-features = false, features = [
  "command",
  "revision",
  "sha1",
] }
indexmap = "2.7"
is-terminal = "0.4"
jiff = "0.2.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
strsim = "0.11"
tar = "0.4"
tempfile = "3"
termcolor = "1.4"
thiserror = "~2.0"
winnow = "1.0"

curl = { version = "0.4", optional = true }

[features]
default = ["import-url"]
import-url = ["dep:curl"]

[profile.for-pkg]
inherits = "release"
lto = true
strip = "none"

[package.metadata.generate-rpm]
assets = [
  { source = "target/release/stg", dest = "/usr/bin/", mode = "755" },
  { source = "README.md", dest = "/usr/share/doc/stgit/", mode = "644" },
  { source = "COPYING", dest = "/usr/share/licenses/stgit/", mode = "644" },
  { source = "Documentation/*.1", dest = "/usr/share/man/man1/", mode = "644", doc = true },
  { source = "completion/stgit.zsh", dest = "/usr/share/zsh/site-functions/_stg", mode = "644" },
  { source = "completion/stg.fish", dest = "/usr/share/fish/vendor_completions.d/", mode = "644" },
  { source = "completion/stgit.bash", dest = "/usr/share/bash-completion/completions/stg", mode = "644" },
  { source = "contrib/vim/ftdetect/stg.vim", dest = "/usr/share/vim/vimfiles/ftdetect/", mode = "644" },
  { source = "contrib/vim/syntax/*.vim", dest = "/usr/share/vim/vimfiles/syntax/", mode = "644" },
]
requires = { git-core = "*", git-email = "*", vim-filesystem = "*" }

[package.metadata.deb]
maintainer = "Peter Grayson <pete@jpgrayson.net>"
section = "vcs"
priority = "optional"
depends = "git"
recommends = "git-email"
extended-description = ""
assets = [
  [
    "target/release/stg",
    "usr/bin/",
    "755",
  ],
  [
    "README.md",
    "usr/share/doc/stgit/",
    "644",
  ],
  [
    "COPYING",
    "usr/share/doc/stgit/copyright",
    "644",
  ],
  [
    "Documentation/*.1",
    "usr/share/man/man1/",
    "644",
  ],
  [
    "completion/stgit.zsh",
    "usr/share/zsh/vendor-completions/_stg",
    "644",
  ],
  [
    "completion/stg.fish",
    "usr/share/fish/vendor-completions.d/",
    "644",
  ],
  [
    "completion/stgit.bash",
    "usr/share/bash-completion/completions/stg",
    "644",
  ],
  [
    "contrib/vim/ftdetect/stg.vim",
    "usr/share/vim/addons/ftdetect/",
    "644",
  ],
  [
    "contrib/vim/syntax/*.vim",
    "usr/share/vim/addons/syntax/",
    "644",
  ],
]
