From b9c226bc18ac37c62b13623523496e5089cd8252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 14 Sep 2013 21:04:22 +0200 Subject: [PATCH] cope with with data file names that contain spaces --- packaging/linux/rpm/buildpackage.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/packaging/linux/rpm/buildpackage.sh b/packaging/linux/rpm/buildpackage.sh index 5b4d36e421..86c188a666 100755 --- a/packaging/linux/rpm/buildpackage.sh +++ b/packaging/linux/rpm/buildpackage.sh @@ -13,7 +13,27 @@ sed -i "s/{VERSION_FIELD}/$PKGVERSION/" openra.spec rootdir=`readlink -f $2` sed -i "s|{ROOT_DIR}|$rootdir|" openra.spec -for x in `find $rootdir -type f` +# List files to avoid owning standard dirs. +for x in `find $rootdir/usr/bin -type f` +do + y="${x#$rootdir}" + sed -i "/%files/ a ${y}" openra.spec +done + +for x in `find $rootdir/usr/share/icons -type f` +do + y="${x#$rootdir}" + sed -i "/%files/ a ${y}" openra.spec +done + +for x in `find $rootdir/usr/share/applications -type f` +do + y="${x#$rootdir}" + sed -i "/%files/ a ${y}" openra.spec +done + +# List directories only to avoid spam and problems with files containing spaces. +for x in `find $rootdir/usr/share/openra -type d` do y="${x#$rootdir}" sed -i "/%files/ a ${y}" openra.spec