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,22 +1,29 @@
#!/bin/bash
E_BADARGS=85
if [ $# -ne "3" ]
if [ $# -ne "4" ]
then
echo "Usage: `basename $0` version root-dir outputdir"
echo "Usage: `basename $0` version root-dir outputdir arch"
exit $E_BADARGS
fi
if [ $4 -eq "x64" ]
then
ARCH=x86_64
else
ARCH=i686
# Replace any dashes in the version string with periods
PKGVERSION=`echo $1 | sed "s/-/\\./g"`
sed -i "s/{VERSION}/$PKGVERSION/" PKGBUILD
rootdir=`readlink -f $2`
sed -i "s|{ROOT}|$rootdir|" PKGBUILD
sed -i "s/{ARCH}/$ARCH/" PKGBUILD
makepkg --holdver
if [ $? -ne 0 ]; then
exit 1
fi
mv openra-$PKGVERSION-1-i686.pkg.tar.xz $3
mv openra-$PKGVERSION-1-$ARCH.pkg.tar.xz $3