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

@@ -5,12 +5,13 @@ COMMON_LIBS = System.dll System.Core.dll System.Drawing.dll System.Xml.dll third
PHONY = core tools package all mods clean distclean
CC = gcc
CFLAGS = -O2 -Wall -m32
CFLAGS = -O2 -Wall
CFLAGS32 = $(CFLAGS) -m32
.SUFFIXES:
core: game renderers mod_ra mod_cnc
tools: editor ralint seqed filex tsbuild utility
package: fixheader core editor utility winlaunch gtklaunch
package: fixheader core editor utility winlaunch gtklaunch gtklaunch32
mods: mod_ra mod_cnc
all: core tools winlaunch
clean:
@@ -183,6 +184,10 @@ gtklaunch: $(gtklaunch_HEADERS) $(gtklaunch_SRCS)
@echo CC launcher
@$(CC) $(CFLAGS) $(shell pkg-config --cflags --libs gtk+-2.0 webkit-1.0) -I/usr/include/ -lgcrypt -o gtklaunch $(gtklaunch_SRCS) /usr/lib/libmicrohttpd.a
gtklaunch32: $(gtklaunch_HEADERS) $(gtklaunch_SRCS)
@echo CC launcher32
@$(CC) $(CFLAGS32) $(shell pkg-config --cflags --libs gtk+-2.0 webkit-1.0) -I/usr/include/ -lgcrypt -o gtklaunch32 $(gtklaunch_SRCS) /usr/lib/libmicrohttpd.a
.PHONY: $(PHONY) $(PROGRAMS)
#
@@ -216,6 +221,7 @@ INSTALL_DIR = $(DESTDIR)$(datadir)/openra
INSTALL = install
INSTALL_PROGRAM = $(INSTALL)
CORE = fileformats rcg rgl rnull game editor utility winlaunch
install: all gtklaunch
@-echo "Installing OpenRA to $(INSTALL_DIR)"
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)

View File

@@ -1,8 +1,8 @@
#!/bin/bash
# OpenRA packaging master script for linux packages
if [ $# -ne "3" ]; then
echo "Usage: `basename $0` version files-dir outputdir"
if [ $# -ne "4" ]; then
echo "Usage: `basename $0` version files-dir outputdir arch"
exit 1
fi
@@ -15,13 +15,19 @@ rm -rf root
# Game files
mkdir -p root/usr/bin/
cp -T $BUILTDIR/gtklaunch root/usr/bin/openra
if [ $4 -eq "x64" ]; then
cp -T $BUILTDIR/gtklaunch root/usr/bin/openra
else
cp -T $BUILTDIR/gtklaunch32 root/usr/bin/openra
fi
mkdir -p root/usr/share/openra/
cp -R $BUILTDIR/* "root/usr/share/openra/" || exit 3
# Remove unneeded files
rm root/usr/share/openra/OpenRA.Launcher.exe
rm root/usr/share/openra/gtklaunch
rm root/usr/share/openra/gtklaunch32
# Desktop Icons
mkdir -p root/usr/share/applications/
@@ -40,7 +46,7 @@ cp -r hicolor root/usr/share/icons/
(
echo "Building Debian package."
cd deb
./buildpackage.sh "$VERSION" ../root "$PACKAGEDIR" &> package.log
./buildpackage.sh "$VERSION" ../root "$PACKAGEDIR" $4 &> package.log
if [ $? -ne 0 ]; then
echo "Debian package build failed, refer to $PWD/package.log."
fi
@@ -49,7 +55,7 @@ cp -r hicolor root/usr/share/icons/
(
echo "Building Arch-Linux package."
cd pkgbuild
sh buildpackage.sh "$VERSION" ../root "$PACKAGEDIR" &> package.log
sh buildpackage.sh "$VERSION" ../root "$PACKAGEDIR" $4 &> package.log
if [ $? -ne 0 ]; then
echo "Arch-Linux package build failed, refer to $PWD/package.log."
fi
@@ -58,7 +64,7 @@ cp -r hicolor root/usr/share/icons/
(
echo "Building RPM package."
cd rpm
sh buildpackage.sh "$VERSION" ../root ~/rpmbuild "$PACKAGEDIR" &> package.log
sh buildpackage.sh "$VERSION" ../root ~/rpmbuild "$PACKAGEDIR" $4 &> package.log
if [ $? -ne 0 ]; then
echo "RPM package build failed, refer to $PWD/package.log."
fi

View File

@@ -1,6 +1,6 @@
Package: openra
Version: {VERSION}
Architecture: i386
Architecture: {ARCH}
Maintainer: Matthew Bowra-Dean <matthew@ijw.co.nz>
Uploaders: Maikel van den Hout <ma1kelvdh@gmail.com>, Paul Chote <sleipnir@sleipnirstuff.com>
Installed-Size: {SIZE}

View File

@@ -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

View File

@@ -3,7 +3,7 @@ pkgname=openra
pkgver={VERSION}
pkgrel=1
pkgdesc="Open Source rebuild of the Red Alert game engine using Mono/OpenGL."
arch=('i686')
arch=('{ARCH}')
url="http://open-ra.org"
license=('GPL3')
groups=()

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

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

View File

@@ -76,10 +76,15 @@ echo "Creating packages..."
(
cd linux
sh buildpackage.sh "$VERSION" "$BUILTDIR" "$OUTPUTDIR" &> package.log
sh buildpackage.sh "$VERSION" "$BUILTDIR" "$OUTPUTDIR" "x86" &> package.log
if [ $? -ne 0 ]; then
echo "linux package build failed, refer to linux/package.log."
fi
sh buildpackage.sh "$VERSION" "$BUILTDIR" "$OUTPUTDIR" "x64" &> package.log
if [ $? -ne 0 ]; then
echo "linux package build failed, refer to linux/package.log."
fi
) &
wait

View File

@@ -25,9 +25,12 @@ esac
LINUXVERSION=`echo $VERSION | sed "s/-/\\./g"`
./uploader.sh linux "$VERSION" $PKGDIR/openra-$LINUXVERSION.deb "deblatest" "$FTPSERVER" "$FTPPATH" "$3" "$4"
./uploader.sh linux "$VERSION" $PKGDIR/openra-$LINUXVERSION-1.i686.rpm "rpmlatest" "$FTPSERVER" "$FTPPATH" "$3" "$4"
./uploader.sh linux "$VERSION" $PKGDIR/openra-$LINUXVERSION-1-i686.pkg.tar.xz "archlatest" "$FTPSERVER" "$FTPPATH" "$3" "$4"
./uploader.sh linux "$VERSION" $PKGDIR/openra-$LINUXVERSION-i386.deb "deblatest32" "$FTPSERVER" "$FTPPATH" "$3" "$4"
./uploader.sh linux "$VERSION" $PKGDIR/openra-$LINUXVERSION-1.i686.rpm "rpmlatest32" "$FTPSERVER" "$FTPPATH" "$3" "$4"
./uploader.sh linux "$VERSION" $PKGDIR/openra-$LINUXVERSION-1-i686.pkg.tar.xz "archlatest32" "$FTPSERVER" "$FTPPATH" "$3" "$4"
./uploader.sh linux "$VERSION" $PKGDIR/openra-$LINUXVERSION-amd64.deb "deblatest" "$FTPSERVER" "$FTPPATH" "$3" "$4"
./uploader.sh linux "$VERSION" $PKGDIR/openra-$LINUXVERSION-1.x86_64.rpm "rpmlatest" "$FTPSERVER" "$FTPPATH" "$3" "$4"
./uploader.sh linux "$VERSION" $PKGDIR/openra-$LINUXVERSION-1-x86_64.pkg.tar.xz "archlatest" "$FTPSERVER" "$FTPPATH" "$3" "$4"
if [ "$TYPE" = "release" ]; then
wput --basename=../ -u ../VERSION ftp://$3:$4@$FTPSERVER/$FTPPATHBASE/master/