Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in18
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index b40c38dd..8e8a64ca 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -866,7 +866,7 @@ get_pkg_arch() {
fi
else
local arch_override
- eval $(declare -f package_$1 | sed -n 's/\(^[[:space:]]*arch=\)/arch_override=/p')
+ pkgbuild_get_attribute "$1" arch arch_override 0
(( ${#arch_override[@]} == 0 )) && arch_override=("${arch[@]}")
if [[ $arch_override = "any" ]]; then
printf "%s\n" "any"
@@ -2121,15 +2121,21 @@ create_srcpackage() {
local i
for i in 'changelog' 'install'; do
- local file
- while read -r file; do
- # evaluate any bash variables used
- eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\"
+ local file files
+
+ [[ $install ]] && files+=("$install")
+ for name in "${pkgname[@]}"; do
+ if extract_function_var "package_$name" "$i" 0 file; then
+ files+=("$file")
+ fi
+ done
+
+ for file in "${files[@]}"; do
if [[ $file && ! -f "${srclinks}/${pkgbase}/$file" ]]; then
msg2 "$(gettext "Adding %s file (%s)...")" "$i" "${file}"
ln -s "${startdir}/$file" "${srclinks}/${pkgbase}/"
fi
- done < <(sed -n "s/^[[:space:]]*$i=//p" "$BUILDFILE")
+ done
done
local TAR_OPT