Files
OpenRA/packaging/linux/rpm/buildpackage.sh
Matthias Mailänder c880e47add list files again to avoid owning standard dirs in RPM
reverts commit 9d256d93a5

fixes file /usr/bin from install of openra-release.20130915-1.noarch
conflicts with file from package filesystem-3.2-13.fc19.x86_64
2013-09-15 10:19:49 +02:00

34 lines
667 B
Bash
Executable File

#!/bin/bash
E_BADARGS=85
if [ $# -ne "4" ]
then
echo "Usage: `basename $0` version root-dir packaging-dir outputdir"
exit $E_BADARGS
fi
# Replace any dashes in the version string with periods
PKGVERSION=`echo $1 | sed "s/-/\\./g"`
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`
do
y="${x#$rootdir}"
sed -i "/%files/ a ${y}" openra.spec
done
cp openra.spec "$3/SPECS/"
cd "$3"
rpmbuild --target noarch --buildroot /tmp/openra/ -bb SPECS/openra.spec
if [ $? -ne 0 ]; then
exit 1
fi
cd RPMS/noarch/
mv openra-$PKGVERSION-1.noarch.rpm $4