Add support for post installation script #3

Open
opened 2026-03-01 09:05:02 -06:00 by GiteaMirror · 16 comments
Owner

Originally created by @Dzordzu on GitHub (Apr 10, 2022).

Simply- add an option that will allow to insert a line inside package()

Originally created by @Dzordzu on GitHub (Apr 10, 2022). Simply- add an option that will allow to insert a line inside `package()`
Author
Owner

@fosskers commented on GitHub (Apr 11, 2022):

What would the argument to the option be? A string to be inserted verbatim?

@fosskers commented on GitHub (Apr 11, 2022): What would the argument to the option be? A string to be inserted verbatim?
Author
Owner

@fosskers commented on GitHub (Oct 2, 2023):

Any updates on this?

@fosskers commented on GitHub (Oct 2, 2023): Any updates on this?
Author
Owner

@Dzordzu commented on GitHub (Oct 4, 2023):

I'm thinking about a path to the executable that will be called after the installation

@Dzordzu commented on GitHub (Oct 4, 2023): I'm thinking about a path to the executable that will be called after the installation
Author
Owner

@fosskers commented on GitHub (Oct 4, 2023):

makepkg already supports having a install.sh file separate from the PKGBUILD. Would that suffice?

@fosskers commented on GitHub (Oct 4, 2023): `makepkg` already supports having a `install.sh` file separate from the PKGBUILD. Would that suffice?
Author
Owner

@Dzordzu commented on GitHub (Oct 4, 2023):

I couldn't find such a flag within makepkg. Can you tell me how to pass it?

My original idea was about performing additional actions just after binary installation. Looking back, I've got no idea why did I suggest package() when post_install() is already available.

And to the background for this issue: I've got a binary that generates manpages and bash completions. It would be awesome if I could setup them during the installation process!

@Dzordzu commented on GitHub (Oct 4, 2023): I couldn't find such a flag within `makepkg`. Can you tell me how to pass it? My original idea was about performing additional actions just after binary installation. Looking back, I've got no idea why did I suggest `package()` when `post_install()` is already available. And to the background for this issue: I've got a binary that generates manpages and bash completions. It would be awesome if I could setup them during the installation process!
Author
Owner

@fosskers commented on GitHub (Oct 5, 2023):

I've got a binary that generates manpages and bash completions.

Ah now I see. Is the binary that generates the manpages and completions separate from the binary produced by cargo aur, or would it be built at the same time in the original Rust build?

@fosskers commented on GitHub (Oct 5, 2023): > I've got a binary that generates manpages and bash completions. Ah now I see. Is the binary that generates the manpages and completions separate from the binary produced by `cargo aur`, or would it be built at the same time in the original Rust build?
Author
Owner

@Dzordzu commented on GitHub (Oct 5, 2023):

Ideally both options should be available, but in my case it's the binary that generates manpages and completions :)

@Dzordzu commented on GitHub (Oct 5, 2023): Ideally both options should be available, but in my case it's the binary that generates manpages and completions :)
Author
Owner

@fosskers commented on GitHub (Oct 5, 2023):

Since PKGBUILDs are downloaded and ran by users, and cargo aur packages prebuilt binaries, where would the manpage generator binary come from so that it could be ran within the PKGBUILD?

@fosskers commented on GitHub (Oct 5, 2023): Since PKGBUILDs are downloaded and ran by users, and `cargo aur` packages prebuilt binaries, where would the manpage generator binary come from so that it could be ran within the PKGBUILD?
Author
Owner

@Dzordzu commented on GitHub (Oct 5, 2023):

manpage generator binary

It's the same binary that is built by the cargo aur :)

https://github.com/clap-rs/clap/tree/master/clap_mangen
https://github.com/Icelk/clap_autocomplete

@Dzordzu commented on GitHub (Oct 5, 2023): > manpage generator binary It's the same binary that is built by the `cargo aur` :) https://github.com/clap-rs/clap/tree/master/clap_mangen https://github.com/Icelk/clap_autocomplete
Author
Owner

@fosskers commented on GitHub (Oct 24, 2023):

So perhaps we should return to the original request:

Simply- add an option that will allow to insert a line inside package()

This is generally reasonable. I could add a new config field that accepts a list of raw strings that would be inserted verbatim into the package function.

@fosskers commented on GitHub (Oct 24, 2023): So perhaps we should return to the original request: > Simply- add an option that will allow to insert a line inside package() This is generally reasonable. I could add a new config field that accepts a list of raw strings that would be inserted verbatim into the `package` function.
Author
Owner

@Dzordzu commented on GitHub (Oct 25, 2023):

Love it! I would also like to thank you for the time you put into this repo. It really does its job :)

@Dzordzu commented on GitHub (Oct 25, 2023): Love it! I would also like to thank you for the time you put into this repo. It really does its job :)
Author
Owner

@fosskers commented on GitHub (Oct 26, 2023):

I'm glad it's helping you!

@fosskers commented on GitHub (Oct 26, 2023): I'm glad it's helping you!
Author
Owner

@fosskers commented on GitHub (Nov 21, 2023):

Update: I have this scheduled to work on in mid-December.

@fosskers commented on GitHub (Nov 21, 2023): Update: I have this scheduled to work on in mid-December.
Author
Owner

@fosskers commented on GitHub (Mar 21, 2024):

@Dzordzu Can you take a look at https://github.com/fosskers/cargo-aur/pull/26 and confirm if it offers what you're expecting?

@fosskers commented on GitHub (Mar 21, 2024): @Dzordzu Can you take a look at https://github.com/fosskers/cargo-aur/pull/26 and confirm if it offers what you're expecting?
Author
Owner

@Dzordzu commented on GitHub (Mar 22, 2024):

Will do during the weekend :)

@Dzordzu commented on GitHub (Mar 22, 2024): Will do during the weekend :)
Author
Owner

@fosskers commented on GitHub (Mar 23, 2024):

This section of the updated README explains the change fully: 6ea9720f90/README.md (custom-commands-within-package)

@fosskers commented on GitHub (Mar 23, 2024): This section of the updated README explains the change fully: https://github.com/fosskers/cargo-aur/blob/6ea9720f902f737bfd4b274f23689d4f865cde8b/README.md#custom-commands-within-package
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cargo-aur#3