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
|
pushd root
|
||||||
|
|
||||||
# Calculate md5sums and clean up the /usr/ part of them
|
# 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
|
chmod 0644 DEBIAN/md5sums
|
||||||
|
|
||||||
# Replace any dashes in the version string with periods
|
# 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`
|
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
|
||||||
|
|
||||||
|
|||||||
@@ -29,3 +29,7 @@ cp -r %{root} $RPM_BUILD_ROOT
|
|||||||
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
|
||||||
@@ -83,7 +83,7 @@ echo "Creating packages..."
|
|||||||
cd osx
|
cd osx
|
||||||
sh buildpackage.sh "$TAG" "$BUILTDIR" "$OUTPUTDIR" &> package.log
|
sh buildpackage.sh "$TAG" "$BUILTDIR" "$OUTPUTDIR" &> package.log
|
||||||
if [ $? -ne 0 ]; then
|
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
|
fi
|
||||||
) &
|
) &
|
||||||
|
|
||||||
@@ -91,14 +91,15 @@ echo "Creating packages..."
|
|||||||
cd linux
|
cd linux
|
||||||
sh buildpackage.sh "$TAG" "$BUILTDIR" "$OUTPUTDIR" &> package.log
|
sh buildpackage.sh "$TAG" "$BUILTDIR" "$OUTPUTDIR" &> package.log
|
||||||
if [ $? -ne 0 ]; then
|
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
|
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
|
if [ $? -ne 0 ]; then
|
||||||
echo "source code package download failed."
|
echo "Source code package download failed."
|
||||||
fi
|
fi
|
||||||
) &
|
) &
|
||||||
wait
|
wait
|
||||||
|
|||||||
Reference in New Issue
Block a user