view libpam-sys/Cargo.toml @ 160:09dff285ff5e

Switch default PAM detection strategy to target-based. To make cross-compilation easier (like for docs.rs), this change makes OS-based detection of PAM the default, only falling back to probing the actual installed PAM as a last resort. I haven't been able to find a Linux distribution that uses anything but Linux-PAM.
author Paul Fisher <paul@pfish.zone>
date Sun, 13 Jul 2025 15:38:00 -0400
parents 4b3a5095f68c
children 0730f5f2ee2a
line wrap: on
line source

[workspace]
resolver = "2"
members = ["libpam-sys-consts", "libpam-sys-helpers", "libpam-sys-test"]

[workspace.package]
version = "0.1.0"
authors = ["Paul Fisher <paul@pfish.zone>"]
repository = "https://hg.pfish.zone/crates/nonstick/"
edition = "2021"
rust-version = "1.75.0"
license = "MIT"

[package]
name = "libpam-sys"
description = "Low-level bindings for PAM (Pluggable Authentication Modules)"
links = "pam"
version.workspace = true
authors.workspace = true
repository.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true

[package.metadata.docs.rs]
default-target = "x86_64-unknown-linux-gnu"

targets = [
    "x86_64-apple-darwin",
    "x86_64-unknown-freebsd",
    "x86_64-unknown-illumos",
]

[dependencies]
libc = "0.2"
libpam-sys-consts = { path = "libpam-sys-consts" }

[target.'cfg(doc)'.dependencies]
libpam-sys-helpers = { path = "libpam-sys-helpers" }

[build-dependencies]
libpam-sys-consts = { path = "libpam-sys-consts" }