From 63cfe65857ad0d7d7cde336357db6e3799e9f766 Mon Sep 17 00:00:00 2001 From: Daenyth Date: Thu, 25 Mar 2010 18:18:59 -0400 Subject: [PATCH] makepkg.sh: Make sure all install are added to source packages This fixes FS#18831. Previously, only the main install file was included in source packages rather than the install files for all packages in split package. --- scripts/makepkg.sh.in | 25 +++++++++++++++++++------ 1 files changed, 19 insertions(+), 6 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 131519f..aa87ab1 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1066,12 +1066,25 @@ create_srcpackage() { ln -s "${BUILDFILE}" "${srclinks}/${pkgbase}/${BUILDSCRIPT}" if [[ -n $install ]]; then - if [[ -f $install ]]; then - msg2 "$(gettext "Adding install script...")" - ln -s "${startdir}/$install" "${srclinks}/${pkgbase}/" - else - error "$(gettext "Install scriptlet (%s) does not exist.")" "$install" - fi + local installfiles=("$install") + fi + if (( SPLITPKG )); then + for pkg in ${pkgname[@]}; do + installfile=$(eval $(type package_$pkg | sed 1d); echo $install) + if [[ -n $installfile ]]; then + installfiles+="$installfile" + fi + done + fi + if [[ -n ${installfiles[0]} ]]; then + msg2 "$(gettext "Adding install script...")" + for installfile in "${installfiles[@]}"; do + if [[ -f $installfile ]]; then + ln -s "${startdir}/$installfile" "${srclinks}/${pkgbase}/" + else + error "$(gettext "Install scriptlet (%s) does not exist.")" "$installfile" + fi + done fi if [[ -n $changelog ]]; then -- 1.7.0