You are not logged in.
Pages: 1
Hi, I want to make a PKGBUILD where the source is downloaded from url and has its own conf file. The problem is that at every new release I should replace just ONE world in the source conf file (something like "default - >custom"). Is there an instruction to do this automatically? Should i need to create a patch and, if yes, how? Thanks in advance.
Last edited by fatpenguin (2023-01-02 15:08:57)
Offline
A patch is an option but I would just use sed in the prepare() function.
Reference: https://wiki.archlinux.org/title/Patching_packages
Jin, Jîyan, Azadî
Offline
I do not see your point. If the given PKGBUILD isn't a vcs-package, you will edit the PKGBUILD manually anyway (at least version number and hash-sums). Why not edit just another file (the conf file) manually?
Offline
Why not edit just another file (the conf file) manually?
Because I should download the source package everytime and edit it, i want something to do this automatically as soon as the source is downloaded.
Offline
A patch is an option but I would just use sed in the prepare() function.
Reference: https://wiki.archlinux.org/title/Patching_packages
That's fine thanks, sed - i with the c function is what i needed. Issue solved.
Offline
I do not see your point. If the given PKGBUILD isn't a vcs-package, you will edit the PKGBUILD manually anyway (at least version number and hash-sums). Why not edit just another file (the conf file) manually?
Because PKGBUILDs are designed to be shared and you don't want to visit everyone who uses it in person to edit their copy of the downloaded configuration file? PKGBUILDs are not supposed to depend on users editing the source they download.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Pages: 1