[arch-general] PKGBUILD

Xavier shiningxc at gmail.com
Sat Oct 10 16:11:24 EDT 2009


On Sat, Oct 10, 2009 at 10:08 PM, Baho Utot <baho-utot at columbus.rr.com> wrote:
> I am constructing a PKGBUILD for a package and I know some of the variables
> have been depreciated
>
> Has $startdir been removed if so what is it new equiv.
>
> Thanks
>

man PKGBUILD

BUILD() FUNCTION
       In addition to the above directives, the build() bash function
comprises the remainder of the PKGBUILD. This is directly sourced
       and executed by makepkg, so anything that bash or the system
has available is available for use here. Be sure any exotic commands
       used are covered by makedepends.

       All of the above variables such as pkgname and pkgver are
available for use in the build function. In addition, makepkg defines
       three variables for your use during the build and install
process. These three variables are as follows:

       startdir
           This contains the absolute path to the directory where the
PKGBUILD was located, which is usually the output of $(pwd) when
           makepkg is started.

       srcdir
           This points to the directory where makepkg extracts or
copies all source files.

       pkgdir
           This points to the directory where makepkg bundles the
installed package (this directory will become the root directory of
           your built package).

       If you create any variables of your own in the build function,
it is recommended to use the bash local keyword to scope the
       variable to inside the build function.


Hmm, I thought we said here that srcdir and pkgdir should be preferred
over startdir...


More information about the arch-general mailing list