64bit linux packages
This commit is contained in:
10
Makefile
10
Makefile
@@ -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
|
PHONY = core tools package all mods clean distclean
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -O2 -Wall -m32
|
CFLAGS = -O2 -Wall
|
||||||
|
CFLAGS32 = $(CFLAGS) -m32
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
core: game renderers mod_ra mod_cnc
|
core: game renderers mod_ra mod_cnc
|
||||||
tools: editor ralint seqed filex tsbuild utility
|
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
|
mods: mod_ra mod_cnc
|
||||||
all: core tools winlaunch
|
all: core tools winlaunch
|
||||||
clean:
|
clean:
|
||||||
@@ -183,6 +184,10 @@ gtklaunch: $(gtklaunch_HEADERS) $(gtklaunch_SRCS)
|
|||||||
@echo CC launcher
|
@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
|
@$(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)
|
.PHONY: $(PHONY) $(PROGRAMS)
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -216,6 +221,7 @@ INSTALL_DIR = $(DESTDIR)$(datadir)/openra
|
|||||||
INSTALL = install
|
INSTALL = install
|
||||||
INSTALL_PROGRAM = $(INSTALL)
|
INSTALL_PROGRAM = $(INSTALL)
|
||||||
CORE = fileformats rcg rgl rnull game editor utility winlaunch
|
CORE = fileformats rcg rgl rnull game editor utility winlaunch
|
||||||
|
|
||||||
install: all gtklaunch
|
install: all gtklaunch
|
||||||
@-echo "Installing OpenRA to $(INSTALL_DIR)"
|
@-echo "Installing OpenRA to $(INSTALL_DIR)"
|
||||||
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)
|
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# OpenRA packaging master script for linux packages
|
# OpenRA packaging master script for linux packages
|
||||||
|
|
||||||
if [ $# -ne "3" ]; then
|
if [ $# -ne "4" ]; then
|
||||||
echo "Usage: `basename $0` version files-dir outputdir"
|
echo "Usage: `basename $0` version files-dir outputdir arch"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -15,13 +15,19 @@ rm -rf root
|
|||||||
|
|
||||||
# Game files
|
# Game files
|
||||||
mkdir -p root/usr/bin/
|
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/
|
mkdir -p root/usr/share/openra/
|
||||||
cp -R $BUILTDIR/* "root/usr/share/openra/" || exit 3
|
cp -R $BUILTDIR/* "root/usr/share/openra/" || exit 3
|
||||||
|
|
||||||
# Remove unneeded files
|
# Remove unneeded files
|
||||||
rm root/usr/share/openra/OpenRA.Launcher.exe
|
rm root/usr/share/openra/OpenRA.Launcher.exe
|
||||||
rm root/usr/share/openra/gtklaunch
|
rm root/usr/share/openra/gtklaunch
|
||||||
|
rm root/usr/share/openra/gtklaunch32
|
||||||
|
|
||||||
# Desktop Icons
|
# Desktop Icons
|
||||||
mkdir -p root/usr/share/applications/
|
mkdir -p root/usr/share/applications/
|
||||||
@@ -40,7 +46,7 @@ cp -r hicolor root/usr/share/icons/
|
|||||||
(
|
(
|
||||||
echo "Building Debian package."
|
echo "Building Debian package."
|
||||||
cd deb
|
cd deb
|
||||||
./buildpackage.sh "$VERSION" ../root "$PACKAGEDIR" &> package.log
|
./buildpackage.sh "$VERSION" ../root "$PACKAGEDIR" $4 &> package.log
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Debian package build failed, refer to $PWD/package.log."
|
echo "Debian package build failed, refer to $PWD/package.log."
|
||||||
fi
|
fi
|
||||||
@@ -49,7 +55,7 @@ cp -r hicolor root/usr/share/icons/
|
|||||||
(
|
(
|
||||||
echo "Building Arch-Linux package."
|
echo "Building Arch-Linux package."
|
||||||
cd pkgbuild
|
cd pkgbuild
|
||||||
sh buildpackage.sh "$VERSION" ../root "$PACKAGEDIR" &> package.log
|
sh buildpackage.sh "$VERSION" ../root "$PACKAGEDIR" $4 &> package.log
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Arch-Linux package build failed, refer to $PWD/package.log."
|
echo "Arch-Linux package build failed, refer to $PWD/package.log."
|
||||||
fi
|
fi
|
||||||
@@ -58,7 +64,7 @@ cp -r hicolor root/usr/share/icons/
|
|||||||
(
|
(
|
||||||
echo "Building RPM package."
|
echo "Building RPM package."
|
||||||
cd rpm
|
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
|
if [ $? -ne 0 ]; then
|
||||||
echo "RPM package build failed, refer to $PWD/package.log."
|
echo "RPM package build failed, refer to $PWD/package.log."
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Package: openra
|
Package: openra
|
||||||
Version: {VERSION}
|
Version: {VERSION}
|
||||||
Architecture: i386
|
Architecture: {ARCH}
|
||||||
Maintainer: Matthew Bowra-Dean <matthew@ijw.co.nz>
|
Maintainer: Matthew Bowra-Dean <matthew@ijw.co.nz>
|
||||||
Uploaders: Maikel van den Hout <ma1kelvdh@gmail.com>, Paul Chote <sleipnir@sleipnirstuff.com>
|
Uploaders: Maikel van den Hout <ma1kelvdh@gmail.com>, Paul Chote <sleipnir@sleipnirstuff.com>
|
||||||
Installed-Size: {SIZE}
|
Installed-Size: {SIZE}
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# OpenRA packaging script for Debian based distributions
|
# OpenRA packaging script for Debian based distributions
|
||||||
E_BADARGS=85
|
E_BADARGS=85
|
||||||
if [ $# -ne "3" ]
|
if [ $# -ne "4" ]
|
||||||
then
|
then
|
||||||
echo "Usage: `basename $0` version root-dir outputdir"
|
echo "Usage: `basename $0` version root-dir outputdir arch"
|
||||||
exit $E_BADARGS
|
exit $E_BADARGS
|
||||||
fi
|
fi
|
||||||
VERSION=$1
|
VERSION=$1
|
||||||
rootdir=`readlink -f $2`
|
rootdir=`readlink -f $2`
|
||||||
PACKAGE_SIZE=`du --apparent-size -c $rootdir/usr | grep "total" | awk '{print $1}'`
|
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)
|
# Copy template files into a clean build directory (required)
|
||||||
mkdir root
|
mkdir root
|
||||||
@@ -16,7 +22,7 @@ cp -R DEBIAN root
|
|||||||
cp -R $rootdir/usr root
|
cp -R $rootdir/usr root
|
||||||
|
|
||||||
# Create the control and changelog files from templates
|
# 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
|
sed "s/{VERSION}/$VERSION/" DEBIAN/changelog > root/DEBIAN/changelog
|
||||||
|
|
||||||
# Build it in the temp directory, but place the finished deb in our starting directory
|
# 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
|
md5sum `find . -type f | grep -v '^[.]/DEBIAN/'` | sed 's/\.\/usr\//usr\//g' > DEBIAN/md5sums
|
||||||
|
|
||||||
# Start building, the file should appear in the output directory
|
# 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
|
# Clean up
|
||||||
popd
|
popd
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ pkgname=openra
|
|||||||
pkgver={VERSION}
|
pkgver={VERSION}
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Open Source rebuild of the Red Alert game engine using Mono/OpenGL."
|
pkgdesc="Open Source rebuild of the Red Alert game engine using Mono/OpenGL."
|
||||||
arch=('i686')
|
arch=('{ARCH}')
|
||||||
url="http://open-ra.org"
|
url="http://open-ra.org"
|
||||||
license=('GPL3')
|
license=('GPL3')
|
||||||
groups=()
|
groups=()
|
||||||
|
|||||||
@@ -1,22 +1,29 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
E_BADARGS=85
|
E_BADARGS=85
|
||||||
if [ $# -ne "3" ]
|
if [ $# -ne "4" ]
|
||||||
then
|
then
|
||||||
echo "Usage: `basename $0` version root-dir outputdir"
|
echo "Usage: `basename $0` version root-dir outputdir arch"
|
||||||
exit $E_BADARGS
|
exit $E_BADARGS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $4 -eq "x64" ]
|
||||||
|
then
|
||||||
|
ARCH=x86_64
|
||||||
|
else
|
||||||
|
ARCH=i686
|
||||||
|
|
||||||
# Replace any dashes in the version string with periods
|
# Replace any dashes in the version string with periods
|
||||||
PKGVERSION=`echo $1 | sed "s/-/\\./g"`
|
PKGVERSION=`echo $1 | sed "s/-/\\./g"`
|
||||||
|
|
||||||
sed -i "s/{VERSION}/$PKGVERSION/" PKGBUILD
|
sed -i "s/{VERSION}/$PKGVERSION/" PKGBUILD
|
||||||
rootdir=`readlink -f $2`
|
rootdir=`readlink -f $2`
|
||||||
sed -i "s|{ROOT}|$rootdir|" PKGBUILD
|
sed -i "s|{ROOT}|$rootdir|" PKGBUILD
|
||||||
|
sed -i "s/{ARCH}/$ARCH/" PKGBUILD
|
||||||
|
|
||||||
makepkg --holdver
|
makepkg --holdver
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv openra-$PKGVERSION-1-i686.pkg.tar.xz $3
|
mv openra-$PKGVERSION-1-$ARCH.pkg.tar.xz $3
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
E_BADARGS=85
|
E_BADARGS=85
|
||||||
if [ $# -ne "4" ]
|
if [ $# -ne "5" ]
|
||||||
then
|
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
|
exit $E_BADARGS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $5 -eq "x64" ]
|
||||||
|
then
|
||||||
|
ARCH=x86_64
|
||||||
|
else
|
||||||
|
ARCH=i386
|
||||||
|
fi
|
||||||
|
|
||||||
# Replace any dashes in the version string with periods
|
# Replace any dashes in the version string with periods
|
||||||
PKGVERSION=`echo $1 | sed "s/-/\\./g"`
|
PKGVERSION=`echo $1 | sed "s/-/\\./g"`
|
||||||
|
|
||||||
@@ -23,11 +30,11 @@ cp openra.spec "$3/SPECS/"
|
|||||||
|
|
||||||
cd "$3"
|
cd "$3"
|
||||||
|
|
||||||
rpmbuild --target i686 -bb SPECS/openra.spec
|
rpmbuild --target $ARCH -bb SPECS/openra.spec
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd RPMS/i686/
|
cd RPMS/$ARCH/
|
||||||
mv openra-$PKGVERSION-1.i686.rpm $4
|
mv openra-$PKGVERSION-1.$ARCH.rpm $4
|
||||||
|
|
||||||
|
|||||||
@@ -76,10 +76,15 @@ echo "Creating packages..."
|
|||||||
|
|
||||||
(
|
(
|
||||||
cd linux
|
cd linux
|
||||||
sh buildpackage.sh "$VERSION" "$BUILTDIR" "$OUTPUTDIR" &> package.log
|
sh buildpackage.sh "$VERSION" "$BUILTDIR" "$OUTPUTDIR" "x86" &> package.log
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "linux package build failed, refer to linux/package.log."
|
echo "linux package build failed, refer to linux/package.log."
|
||||||
fi
|
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
|
wait
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,12 @@ esac
|
|||||||
|
|
||||||
LINUXVERSION=`echo $VERSION | sed "s/-/\\./g"`
|
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-i386.deb "deblatest32" "$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.rpm "rpmlatest32" "$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-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
|
if [ "$TYPE" = "release" ]; then
|
||||||
wput --basename=../ -u ../VERSION ftp://$3:$4@$FTPSERVER/$FTPPATHBASE/master/
|
wput --basename=../ -u ../VERSION ftp://$3:$4@$FTPSERVER/$FTPPATHBASE/master/
|
||||||
|
|||||||
Reference in New Issue
Block a user