diff 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 diff
--- a/libpam-sys/Cargo.toml	Sat Jul 12 18:16:18 2025 -0400
+++ b/libpam-sys/Cargo.toml	Sun Jul 13 15:38:00 2025 -0400
@@ -21,6 +21,15 @@
 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" }
@@ -28,8 +37,5 @@
 [target.'cfg(doc)'.dependencies]
 libpam-sys-helpers = { path = "libpam-sys-helpers" }
 
-[dev-dependencies]
-libpam-sys-helpers = { path = "libpam-sys-helpers" }
-
 [build-dependencies]
 libpam-sys-consts = { path = "libpam-sys-consts" }