kornelski / cargo-deb

Make Debian packages directly from Rust/Cargo projects
https://lib.rs/cargo-deb
MIT License
431 stars 52 forks source link

Add option to pass arguemnts to dpkg_shlibdeps #18

Closed contradict closed 2 years ago

contradict commented 2 years ago

When crosscompiling, it is often necessary to pass extra arguments to dpkg_shlibs to point to the library search path or exclude architecture-specific libraries. This adds a new option dpkg-shlibdeps-args to package.metadata.deb to allow these arguments.

This should resolve #5

kornelski commented 2 years ago

I would prefer cargo deb to be smart enough to figure this out automatically. It needs to add a flag to sysroot, right? We already do this for pkg-config crate automatically.

To me more options = worse software. I do not want to add more options that do nothing except avoiding breakage.

contradict commented 2 years ago

OK, no problem.

kornelski commented 2 years ago

Would you be interested in making a PR that adds this flag automatically?

contradict commented 2 years ago

Yeah, but I haven't figured out a strategy that looks reliable yet. If you have an idea I would be happy to try again.

kornelski commented 2 years ago

We have debian_triple function that we use to set PKG_CONFIG_PATH. I presume the same would work for the lib dir, since Debian should have consistent naming for its sysroots.