summaryrefslogtreecommitdiff
path: root/makechrootpkg
diff options
context:
space:
mode:
authorEric Bélanger <snowmaniscool@gmail.com>2010-06-27 21:08:19 -0400
committerPierre Schmitz <pierre@archlinux.de>2010-06-28 08:07:41 +0200
commit964c0d1640ad00cdededf1b5d1e26878659c056c (patch)
tree63a57330f932a035ea930204121fa2017ea41777 /makechrootpkg
parent76f3e2594955b852e9dbffea46d1d680c4cd71a6 (diff)
downloaddevtools32-964c0d1640ad00cdededf1b5d1e26878659c056c.tar.xz
Fixed changelog support to work with makepkg 3.4
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'makechrootpkg')
-rwxr-xr-xmakechrootpkg16
1 files changed, 13 insertions, 3 deletions
diff --git a/makechrootpkg b/makechrootpkg
index 830a8af..01cb3a9 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -175,9 +175,19 @@ for f in $install_files;do
fi
done
-if [ -f 'ChangeLog' ]; then
- cp ChangeLog "$copydir/build/"
-fi
+changelog_files=$(grep 'changelog=' PKGBUILD)
+for pkg in ${pkgname[@]}; do
+ changelog_files+=' '
+ changelog_files+=$(echo $changelog_files |sed "s/\$pkgname/$pkg/"|sed "s/\${pkgname}/$pkg/")
+ changelog_files=$(eval echo $changelog_files |tr '[:blank:]' '\n'|sort |uniq)
+done
+
+for f in $changelog_files;do
+ changelog="${f#"changelog="}"
+ if [ "$changelog" != "" -a -f "$changelog" ]; then
+ cp "$changelog" "$copydir/build/"
+ fi
+done
chown -R nobody "$copydir/build"
chown -R nobody "$copydir/srcdest"