Closed andrews05 closed 8 months ago
Maybe we can use cargo-deb to make a deb package in the github workflow.
I'm not sure what to actually do with the man file from here, I guess it's up to the packaging process to do something with it? See #69 (comment)
Speaking as the current maintainer of the Fedora and EPEL packages, if the build process generates a man page then that’s all I need. I can easily install it.
@musicinmybrain Excellent, that's what I was hoping.
This is beautiful, great work! For reference, here's an excerpt of the rendered page:
It was faster for me to push two extra small changes than explaining them on a PR review, but the summary of what I did is as follows:
generated/assets
folder instead of target/assets
. The rationale for this change is that we need to create files outside of OUT_DIR
anyway, and OUT_DIR
's relative location to target
is purposefully underspecified. The previous logic could fail when using the --target
for a fresh cargo build
, and maybe if we do weird shenanigans to change the target directory, so it's best to leverage the fact that build scripts are executed from a consistent working directory and put stuff into a well-known directory that's ignored by Git.DISPLAY
chunk names from the source code constant, so we don't need to hardcode them anymore :smile: Awesome, thanks @AlexTMjugador, your changes look great!
What do you think about changing the workflow to use cargo-deb for the linux builds?
What do you think about changing the workflow to use cargo-deb for the linux builds?
I think that's a good and doable idea. We can begin distributing the generated .deb ourselves too, so even if we don't make it to the official Debian repositories anytime soon, people can still manage their OxiPNG install with the APT package manager.
This PR adds a build script to generate a man page using clap_mangen, as per this example: https://github.com/sondr3/clap-man-example/blob/main/build.rs
I'm not sure what to actually do with the man file from here, I guess it's up to the packaging process to do something with it? See https://github.com/shssoichiro/oxipng/issues/69#issuecomment-1963352536
Note I couldn't see a way to include the
DISPLAY
chunk names from the constant as we did before. They're now just hardcoded into the help and will require manually updating if the list changes.Closes #526