[pacman-dev] Configure --prefix in PKGBUILD scripts

Allan McRae mcrae_allan at hotmail.com
Wed Jun 4 06:23:01 EDT 2008


Antonio Huete Jimenez wrote:
> I was thinking a way of changing --prefix= used in configure. I think 
> it's desirable to have a chance to change this to another directory, 
> specially in BSD where a lot of userland applications should not be 
> replaced with packages.
>
> pkgsrc does that by installing on /usr/pkg its bin, doc, lib, etc ...
>
> We could add to makepkg.conf the option PREFIX so we can use later 
> $PREFIX in PKGBUILD. For Archlinux we could specify /usr by default 
> and use /usr/pac for others, or whatever the user needs to.
> This wouldn't affect ABS behaviour in Archlinux IMHO
>
> What do you think guys? :)


Let me get this correct.  You want to add a PREFIX option in 
makepkg.conf so then people will use "./configure --prefix=${PREFIX}" in 
the PKGBUILDs and thus PKGBUILDs are portable across operating systems?

If I interpreted you right there, it seems a bit of a waste of time to 
me.  When writing an Arch PKGBUILD, why would anybody write "${PREFIX}" 
instead of "/usr". One is a lot simpler, clearer and shorter and when 
writing a PKGBUILD for Arch, you are targeting Arch not every other 
operating system. 

Also, if porting Arch PKGBUILDs to other operating systems, changing the 
prefix is likely to be the easy part...

Allan






More information about the pacman-dev mailing list