[pacman-dev] $startdir in PKGBUILDs
Loui Chang
louipc.ist at gmail.com
Sat Jun 5 10:50:13 EDT 2010
On Fri 04 Jun 2010 11:42 +1000, Allan McRae wrote:
> On 04/06/10 10:25, Dan McGee wrote:
> >On Thursday, June 3, 2010, Allan McRae<allan at archlinux.org> wrote:
> >>Can anyone think of an actual use of $startdir in PKGBUILDs?
> >
> >It is used in VCS builds on occasion as the location of the dowloaded
> >repo so that buildin clean (wiping out src/) doesn't force you to
> >re-clone or whatever.
> >
>
> That is indeed a good usage. We will keep it then!
>
> I suppose a big push in Arch to replace $startdir usage will remind
> people once again not to use $startdir/{src,pkg}.
$startdir is also useful for upstream if they want to maintain a
PKGBUILD in their devel repo and build arch packages themselves.
This is assuming that $srcdir or $pkgdir doesn't always mean
$startdir/src and $startdir/pkg. Otherwise one of those vars could be
used.
Example:
files tree:
Makefile.am
configure
packaging/
archlinux/
PKGBUILD
debian/
fedora/
build() {
cd $startdir/../..
./configure
make
make install
}
More information about the pacman-dev
mailing list