cargo-aur
cargo-aur copied to clipboard
Support 'from source' packaging, and using crates.io as a source
Added new flags --no-bin
and --source
.
Existing behaviour is --source project
.
New options
--source crates-io --no-bin
Download crate from crates.io, get it's checksum, and write a PKGBUILD that downloads and builds from crates.io. No tarball is produced.
Example PKGBUILD
https://gist.github.com/nick42d/6ce7809a0b24444aaccf9655811cb750
--source crates-io
Download crate from crates.io, and create a binary release tarball in target/cargo-aur
. Write a PKGBUILD that assumes user will upload binary release tarball to github/gitlab
Example PKGBUILD
https://gist.github.com/nick42d/dfe9e652473370671fecae9bce2d84fd
--source project --no-bin
Package the source code of the project to a source tarball in target/cargo-aur
. Write a PKGBUILD that assumes user will upload source tarball to github/gitlab
Example PKGBUILD
https://gist.github.com/nick42d/e441adb325c01cbbee68c835bfe58e3b
This change should be non-breaking as --source
defaults to project
so I put this as a minor version bump. However, you could consider a major version bump due to the new functionality.
Testing note: the version number in Cargo.toml is used to download the .crate. If you try and run --source crates.io
with version = "1.7.2"
this will fail since 1.7.2 isn't uploaded to crates.io yet. Change version to 1.7.1 to test the new flags.