simplify RPM buildpackage script for the build server

hard-code everything outside /usr/share/openra
This commit is contained in:
Matthias Mailänder
2013-10-19 13:10:33 +02:00
parent 5d2254aeee
commit af0f8d09d6
2 changed files with 7 additions and 26 deletions

View File

@@ -13,32 +13,10 @@ sed -i "s/{VERSION_FIELD}/$PKGVERSION/" openra.spec
rootdir=`readlink -f $2`
sed -i "s|{ROOT_DIR}|$rootdir|" openra.spec
# List files to avoid owning standard dirs.
`find $rootdir/usr/bin -type f -print0` | xargs -0 -n 1 echo | while read x
for x in `find $rootdir/usr/share/openra -type d`
do
y="${x#$rootdir}"
sed -i "/%files/ a \"${y}\"" openra.spec
done
`find $rootdir/usr/share/icons -type f -print0` | xargs -0 -n 1 echo | while read x
do
y="${x#$rootdir}"
sed -i "/%files/ a \"${y}\"" openra.spec
done
`find $rootdir/usr/share/applications -type f -print0` | \
xargs -0 -n 1 echo | \
while read x
do
y="${x#$rootdir}"
sed -i "/%files/ a \"${y}\"" openra.spec
done
# List directories only to avoid spam
`find $rootdir/usr/share/openra -type d -print0` | xargs -0 -n 1 echo | while read x
do
y="${x#$rootdir}"
sed -i "/%files/ a \"${y}\"" openra.spec
sed -i "/%files/ a ${y}" openra.spec
done
cp openra.spec "$3/SPECS/"
@@ -52,4 +30,3 @@ fi
cd RPMS/noarch/
mv openra-$PKGVERSION-1.noarch.rpm $4

View File

@@ -23,9 +23,13 @@ and includes Command & Conquer: Tiberian Dawn as an official mod.
%install
rm -rf $RPM_BUILD_ROOT
cp -r %{root} $RPM_BUILD_ROOT
cp -r %{root} $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
/usr/bin/openra
/usr/bin/openra-editor
/usr/share/applications/*.desktop
/usr/share/icons/hicolor/*/apps/*.png