mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-02 10:21:49 -05:00
makepkg: Add fallback to package function
makepkg looks for a package() function when building a single package but package_$pkgname() style package functions when building a split package. This patch allows the use of a package_$pkgname() function when building a single package for consistency. This is achieved by having makepkg consider a non-split package with a package_$pkgname() function as a split package (creating just the one package). Fixes FS#16622. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
c2999619d2
commit
9c34dfd908
@ -1686,10 +1686,6 @@ if (( GENINTEG )); then
|
||||
exit 0 # $E_OK
|
||||
fi
|
||||
|
||||
if [ "$(type -t package)" = "function" ]; then
|
||||
PKGFUNC=1
|
||||
fi
|
||||
|
||||
# check the PKGBUILD for some basic requirements
|
||||
check_sanity || exit 1
|
||||
|
||||
@ -1704,6 +1700,12 @@ if (( ${#pkgname[@]} > 1 )); then
|
||||
SPLITPKG=1
|
||||
fi
|
||||
|
||||
if [ "$(type -t package)" = "function" ]; then
|
||||
PKGFUNC=1
|
||||
elif [ $SPLITPKG -eq 0 -a "$(type -t package_${pkgname})" = "function" ]; then
|
||||
SPLITPKG=1
|
||||
fi
|
||||
|
||||
pkgbase=${pkgbase:-${pkgname[0]}}
|
||||
|
||||
if (( ! SPLITPKG )); then
|
||||
|
Loading…
x
Reference in New Issue
Block a user