64bit linux packages
This commit is contained in:
@@ -1,14 +1,20 @@
|
||||
#!/bin/bash
|
||||
# OpenRA packaging script for Debian based distributions
|
||||
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
|
||||
VERSION=$1
|
||||
rootdir=`readlink -f $2`
|
||||
PACKAGE_SIZE=`du --apparent-size -c $rootdir/usr | grep "total" | awk '{print $1}'`
|
||||
if [ $4 -eq "x64" ]
|
||||
then
|
||||
ARCH=amd64
|
||||
else
|
||||
ARCH=i386
|
||||
fi
|
||||
|
||||
# Copy template files into a clean build directory (required)
|
||||
mkdir root
|
||||
@@ -16,7 +22,7 @@ cp -R DEBIAN root
|
||||
cp -R $rootdir/usr root
|
||||
|
||||
# Create the control and changelog files from templates
|
||||
sed "s/{VERSION}/$VERSION/" DEBIAN/control | sed "s/{SIZE}/$PACKAGE_SIZE/" > root/DEBIAN/control
|
||||
sed "s/{VERSION}/$VERSION/" DEBIAN/control | sed "s/{SIZE}/$PACKAGE_SIZE/" | sed "s/{ARCH}/$ARCH/" > root/DEBIAN/control
|
||||
sed "s/{VERSION}/$VERSION/" DEBIAN/changelog > root/DEBIAN/changelog
|
||||
|
||||
# Build it in the temp directory, but place the finished deb in our starting directory
|
||||
@@ -26,7 +32,7 @@ pushd root
|
||||
md5sum `find . -type f | grep -v '^[.]/DEBIAN/'` | sed 's/\.\/usr\//usr\//g' > DEBIAN/md5sums
|
||||
|
||||
# Start building, the file should appear in the output directory
|
||||
dpkg-deb -b . $3/openra-$VERSION.deb
|
||||
dpkg-deb -b . $3/openra-$VERSION-$ARCH.deb
|
||||
|
||||
# Clean up
|
||||
popd
|
||||
|
||||
Reference in New Issue
Block a user