Merge pull request #3960 from Mailaender/rpm-revert
Simplified the RPM build scripts again
This commit is contained in:
@@ -43,7 +43,7 @@ sed "s/{VERSION}/$VERSION/" DEBIAN/control | sed "s/{SIZE}/$PACKAGE_SIZE/" > roo
|
||||
pushd root
|
||||
|
||||
# Calculate md5sums and clean up the /usr/ part of them
|
||||
md5sum `find . -type f | grep -v '^[.]/DEBIAN/'` | sed 's/\.\/usr\//usr\//g' > DEBIAN/md5sums
|
||||
md5sum "`find . -type f | grep -v '^[.]/DEBIAN/'` | sed 's/\.\/usr\//usr\//g'" > DEBIAN/md5sums
|
||||
chmod 0644 DEBIAN/md5sums
|
||||
|
||||
# Replace any dashes in the version string with periods
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -75,7 +75,7 @@ echo "Creating packages..."
|
||||
if [ $? -eq 0 ]; then
|
||||
mv OpenRA.exe "$OUTPUTDIR"/OpenRA-$TAG.exe
|
||||
else
|
||||
echo "Windows package build failed, refer to windows/package.log."
|
||||
echo "Windows package build failed, refer to windows/package.log."
|
||||
fi
|
||||
) &
|
||||
|
||||
@@ -83,7 +83,7 @@ echo "Creating packages..."
|
||||
cd osx
|
||||
sh buildpackage.sh "$TAG" "$BUILTDIR" "$OUTPUTDIR" &> package.log
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "OSX package build failed, refer to osx/package.log."
|
||||
echo "OS X package build failed, refer to osx/package.log."
|
||||
fi
|
||||
) &
|
||||
|
||||
@@ -91,14 +91,15 @@ echo "Creating packages..."
|
||||
cd linux
|
||||
sh buildpackage.sh "$TAG" "$BUILTDIR" "$OUTPUTDIR" &> package.log
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "linux package build failed, refer to linux/package.log."
|
||||
echo "Linux package build failed, refer to linux/package.log."
|
||||
fi
|
||||
) &
|
||||
|
||||
(
|
||||
curl -L -o "$OUTPUTDIR/$TAG.tar.gz" "https://github.com/OpenRA/OpenRA/archive/$TAG.tar.gz"
|
||||
echo "Downloading source code packages from GitHub."
|
||||
curl -s -L -o "$OUTPUTDIR/$TAG.tar.gz" "https://github.com/OpenRA/OpenRA/archive/$TAG.tar.gz"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "source code package download failed."
|
||||
echo "Source code package download failed."
|
||||
fi
|
||||
) &
|
||||
wait
|
||||
|
||||
Reference in New Issue
Block a user