makepkg: clean up BUILDSCRIPT usage
commit5dc0b80c2683551c10b96157ba34b277db25b82d
authorAllan McRae <allan@archlinux.org>
Sun, 12 Jul 2009 07:10:11 +0000 (12 17:10 +1000)
committerAllan McRae <allan@archlinux.org>
Sun, 12 Jul 2009 07:32:57 +0000 (12 17:32 +1000)
tree904168141a5bf70904f6a90ae70fccbed55f1036
parent104daa16a69708c9b16fc59ac895f2932ea509d4
makepkg: clean up BUILDSCRIPT usage

FS#15448 (which is made worse by the "fix" for FS#14727...), highlighted
some deficiencies in the usage of the BUILDSCRIPT variable. In particular,
only relative paths worked with "-p" and some output was very strange in
combination with the "-p" flag or reading from /dev/stdin. e.g.
"Please add a license line to your /dev/stdin!".

This patch adds a new variable, BUILDFILE, which contains the full path
to the BUILDSCRIPT.  This defaults to $startdir/$BUILDSCRIPT.

Also, fix a missed quoting of $BUILD{SCRIPT->FILE} and remove warning
about missing BUILDSCRIPT definition in makepkg.conf as the default
BUILDSCRIPT value is now specified during configure. Add check that
BUILDFILE is writable before updating VCS PKGBUILDs. When making a source
package, the BUILDSCRIPT always gets given the default name, regardless
of what it was originally called.

Signed-off-by: Allan McRae <allan@archlinux.org>
scripts/makepkg.sh.in