64bit linux packages

This commit is contained in:
Matthew Bowra-Dean
2011-01-05 13:26:44 +13:00
parent 8dcba13491
commit 0d038f00ba
9 changed files with 66 additions and 26 deletions

View File

@@ -1,11 +1,18 @@
#!/bin/bash
E_BADARGS=85
if [ $# -ne "4" ]
if [ $# -ne "5" ]
then
echo "Usage: `basename $0` version root-dir packaging-dir outputdir"
echo "Usage: `basename $0` version root-dir packaging-dir outputdir arch"
exit $E_BADARGS
fi
if [ $5 -eq "x64" ]
then
ARCH=x86_64
else
ARCH=i386
fi
# Replace any dashes in the version string with periods
PKGVERSION=`echo $1 | sed "s/-/\\./g"`
@@ -23,11 +30,11 @@ cp openra.spec "$3/SPECS/"
cd "$3"
rpmbuild --target i686 -bb SPECS/openra.spec
rpmbuild --target $ARCH -bb SPECS/openra.spec
if [ $? -ne 0 ]; then
exit 1
fi
cd RPMS/i686/
mv openra-$PKGVERSION-1.i686.rpm $4
cd RPMS/$ARCH/
mv openra-$PKGVERSION-1.$ARCH.rpm $4