simplify RPM buildpackage script for the build server
hard-code everything outside /usr/share/openra
This commit is contained in:
@@ -13,32 +13,10 @@ sed -i "s/{VERSION_FIELD}/$PKGVERSION/" openra.spec
|
|||||||
rootdir=`readlink -f $2`
|
rootdir=`readlink -f $2`
|
||||||
sed -i "s|{ROOT_DIR}|$rootdir|" openra.spec
|
sed -i "s|{ROOT_DIR}|$rootdir|" openra.spec
|
||||||
|
|
||||||
# List files to avoid owning standard dirs.
|
for x in `find $rootdir/usr/share/openra -type d`
|
||||||
`find $rootdir/usr/bin -type f -print0` | xargs -0 -n 1 echo | while read x
|
|
||||||
do
|
do
|
||||||
y="${x#$rootdir}"
|
y="${x#$rootdir}"
|
||||||
sed -i "/%files/ a \"${y}\"" openra.spec
|
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
|
|
||||||
done
|
done
|
||||||
|
|
||||||
cp openra.spec "$3/SPECS/"
|
cp openra.spec "$3/SPECS/"
|
||||||
@@ -52,4 +30,3 @@ fi
|
|||||||
|
|
||||||
cd RPMS/noarch/
|
cd RPMS/noarch/
|
||||||
mv openra-$PKGVERSION-1.noarch.rpm $4
|
mv openra-$PKGVERSION-1.noarch.rpm $4
|
||||||
|
|
||||||
|
|||||||
@@ -23,9 +23,13 @@ and includes Command & Conquer: Tiberian Dawn as an official mod.
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
cp -r %{root} $RPM_BUILD_ROOT
|
cp -r %{root} $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
/usr/bin/openra
|
||||||
|
/usr/bin/openra-editor
|
||||||
|
/usr/share/applications/*.desktop
|
||||||
|
/usr/share/icons/hicolor/*/apps/*.png
|
||||||
Reference in New Issue
Block a user