This is a bit confusing for me:
In old packages, there was no
package() function. So, putting compiled files was done at the end of the
build() function. If
package() is not present,
build() runs via fakeroot. If
package() is present,
build() runs as the user calling makepkg,
package() runs via fakeroot.
- Putting = arranging or installing into the pkg/ temporary staging directory, ready to be packaged by makepkg; i.e. what the package() function is now for. Maybe if it said “putting files into pkg/”? The last sentence is saying what normally happens: only package() runs in the fakeroot environment, and build() runs without any special privileges (so cannot set file ownership, etc). Vadmium (talk) 22:54, 29 January 2013 (UTC).
Conflicting information about prepare() and build() functions
The sections about the
build() functions contain conflicting information. Both sections state that they are for configuring the sources, which I assume to mean running a configure script, if one is present. Is there an official decree on which function the configure script should be run in? makepkg(8) and PKGBUILD(5) don't make this clear. Link: https://wiki.archlinux.org/index.php/Creating_Packages#The_prepare.28.29_function
-- Jstjohn (talk) 10:45, 18 May 2013 (UTC)