mmstick / cargo-deb

A cargo subcommand that generates Debian packages from information in Cargo.toml
615 stars 50 forks source link

Support: arch spec constraint #116

Closed eldesh closed 4 years ago

eldesh commented 4 years ago

I added architecture restrictions syntax like below:

# Cargo.toml
..
depends: foo [!i386], bar [amd64], buzz [armhf]
..

For this file, if you build a package like cargo deb --target=arm-unknown-linux-gnueabihf, resulting .deb contains only foo and buzz like:

Depends: foo, buzz

Specification strings (e.g. [i386]) and dependencies not match to the build target (i.e. arm) are eliminated from cargo-deb.

kornelski commented 4 years ago

Thanks. That's a nice feature.

Since you're using regex, maybe extract the arch using regex instead of chopping the string "manually" afterwards?

eldesh commented 4 years ago

Thank you for your feedback. I have fixed manual chopping to use regex capture.

kornelski commented 4 years ago

Thank you