makepkg used to check OPTIONS too, which could override
BUILDENV. Implement a new function that handles these
options more like OPTIONS.
This also reduces code duplication a bit.
Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
The return value was being assigned when an error was found in a PKGBUILD's
arch array but it never was returned.
Also remove error message explaining about adding the arch array to a PKGBUILD.
That was added a long time ago when the arch array first became compulsory.
Signed-off-by: Allan McRae <allan@archlinux.org>
When extracting variables from PKGBUILD (e.g. for .SRCINFO creation) we make
assumptions about whether variables are arrays or not. This adds a check to
the PKGBUILD linter to ensure variables are arrays or not as appropriate.
Signed-off-by: Allan McRae <allan@archlinux.org>
The check that pkgver is non-empty done in check_pkgver should also be
performed after running the pkgver() function. Merge validate_pkgver
into check_pkgver and run check_pkgver after updating pkgver.
Signed-off-by: Allan McRae <allan@archlinux.org>
Hi. This change allows makepkg to UPX-compress executables on Windows, but will probably affect some Linux packages as well (I'm guessing gdbserver, wine, mingw-w64).
Signed-off-by: Allan McRae <allan@archlinux.org>
To add a new package check, drop a file in libmakepkg/lint and add the
function to the "lint_functions" array.
Signed-off-by: Allan McRae <allan@archlinux.org>
To add a new packaging option, drop a file into libmakepkg/tidy that contains
a 'packaging_options+=('<option>') and a function that implements that
option. The function needs added to the 'tidy_remove' array if it removes
files or the 'tidy_modify' array otherwise.
Signed-off-by: Allan McRae <allan@archlinux.org>
This performs all the needed work for libmakepkg to be included in
tarballs, installed into the correct place, and read into makepkg.
Also change the install root for libmakepkg to an architecture independant
location.
Signed-off-by: Allan McRae <allan@archlinux.org>