You are not logged in.

#1 2024-10-03 15:58:34

2handband
Member
Registered: 2011-01-21
Posts: 65

Building a package from modified source

I'm testing an update to CrystalDock for the developer. I have the package crystal-dock-git installed from AUR. I've modified the source file as requested by the dev, and now need to install this version.

My question: how do I make the PKGbuild file point to the modified sources instead of pulling from github? Do I need to create a source tarball (and if so what is the correct procedure), or can I just have it build from the already decompressed directories?

Last edited by 2handband (2024-10-03 16:37:33)

Offline

#2 2024-10-03 16:38:36

mesaprotector
Member
Registered: 2024-03-03
Posts: 151

Re: Building a package from modified source

What I've done before is to first build the package with makepkg -rsoc, then make changes to the files in the src directory, and finally install with makepkg -ei.

With a different package I just changed the PKGBUILD to point to my fork of the repo, so you can also do that depending on your needs.

Last edited by mesaprotector (2024-10-03 16:45:44)

Offline

#3 2024-10-04 10:07:41

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,926

Re: Building a package from modified source

Or you
- create a patch with the changes
- edit the PKGBUILD
- add the patch to source array
- apply the patch in a prepare() function

https://wiki.archlinux.org/title/Patching_packages for details


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Online

#4 2024-10-04 13:27:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: Building a package from modified source

Personally, I'd say just use `makepkg -e` (optionally with the 'i' flag too) until you get it working as this is the simplest / fastest to iterate.  Once you have a working source tree, then you can generate a patch against the original, and either submit that patch upstream or include it in the source / PKGBUILD for subsequent builds.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB