Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for post installation script #10

Open
Dzordzu opened this issue Apr 10, 2022 · 16 comments
Open

Add support for post installation script #10

Dzordzu opened this issue Apr 10, 2022 · 16 comments

Comments

@Dzordzu
Copy link

Dzordzu commented Apr 10, 2022

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

@fosskers
Copy link
Owner

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

@fosskers
Copy link
Owner

fosskers commented Oct 2, 2023

Any updates on this?

@Dzordzu
Copy link
Author

Dzordzu commented Oct 4, 2023

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

@fosskers
Copy link
Owner

fosskers commented Oct 4, 2023

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

@Dzordzu
Copy link
Author

Dzordzu commented 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!

@fosskers
Copy link
Owner

fosskers commented 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?

@Dzordzu
Copy link
Author

Dzordzu commented Oct 5, 2023

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

@fosskers
Copy link
Owner

fosskers commented 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?

@Dzordzu
Copy link
Author

Dzordzu commented 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

@fosskers
Copy link
Owner

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.

@Dzordzu
Copy link
Author

Dzordzu commented 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 :)

@fosskers
Copy link
Owner

I'm glad it's helping you!

@fosskers
Copy link
Owner

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

@fosskers
Copy link
Owner

@Dzordzu Can you take a look at #26 and confirm if it offers what you're expecting?

@Dzordzu
Copy link
Author

Dzordzu commented Mar 22, 2024

Will do during the weekend :)

@fosskers
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants