You are not logged in.
Hello.
I am trying to make an a AUR package in case I will need to install it in the future again, or someone else will need to use ScriptBasic.
https://aur.archlinux.org/packages/scriptbasic/
The PKGBUILD has multiple problems:
1.) The source tar has some weird permissions, hence the line `sudo chmod -R 755 "scriptbasic"`. Is this a good practice?
2.) The line `sudo ./install.sh` in package() installs the files to the FS even when I am just building it with `makepkg -srf', without the -i switch. How to prevent this?
Any suggestions and improvements are welcome Thank You
Offline
Stop using sudo, I guess? I cannot fathom why you would use it on the source files in the first place, as they aren't supposed to be owned by root anyway and the actual ./install.sh should be installing the files to "${pkgdir}", e.g. Makefiles are usually given the DESTDIR="${pkgdir}/" directive.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Hello Eschwartz.
Thank You for the insights, they are reasonable. I will work them in soon.
Offline
Hello.
I removed the sudo from chmod line and it is ok no.
However, please,
how do I trick install.sh to not copy the files into "/" but into "${pkgdir}". The file is generated, doing a .patch that removes all the leading / from all the paths in it is not advisable.
Is there any way around it?
Thanks for any suggestions!
EDIT
I was experimenting with `firejail --overlay ./install.sh` but the install.sh still wants to operate with sudo. I am thinking about rewriting that script to move the data myself into "${pkgdir}" unless someone suggests some more sophisticated method.
Last edited by delmadord (2017-02-22 21:32:45)
Offline
Ok so I was able to understand what is going on in that `./install.sh` script and translated it into the `package()` function.
Can you please provide any helpful hints on how to improve the quality of the PKGBUILD further?
Thank You!
Offline
Usually empty directories are left out of $pkgdir and created at first run if needed.
Group the install commands on path used so it's easy to see if you are creating empty directories .
Post the empty directories that are created atm, so we can look into details what to do with them.
Arch packages don't include *.a files by default .
Unless another package doesn't work without that file present, skip it.
/usr/local/ on arch is normally not used by packages, try to figure out where those files should be useful/findable .
https://wiki.archlinux.org/index.php/Ar … irectories
Last edited by Lone_Wolf (2017-02-23 11:54:54)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline