Begin rework of packaging scripts. Restructure packaging system, and make osx and debian packages work.
Changed semantics: - package upload is handled by a separate script - dropped syntax highlighting (unnecessary, and had concurrency issues) - `make install' is no longer used in the packaging process - debian package changelog points to the forum, instead of showing out of date info - debian package ships tao dlls in the game root, and doesn't insert them in the gac - debian package refers users to the website for help manually installing packages
This commit is contained in:
67
packaging/linux/buildpackage.sh
Normal file
67
packaging/linux/buildpackage.sh
Normal file
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
# OpenRA packaging master script for linux packages
|
||||
|
||||
if [ $# -ne "3" ]; then
|
||||
echo "Usage: `basename $0` version files-dir outputdir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION=$1
|
||||
BUILTDIR=$2
|
||||
PACKAGEDIR=$3
|
||||
|
||||
# Game files
|
||||
mkdir -p root/usr/bin/
|
||||
cp openra root/usr/bin/
|
||||
mkdir -p root/usr/share/openra/
|
||||
cp -R "$BUILTDIR/" "root/usr/share/openra/" || exit 3
|
||||
|
||||
# Desktop Icons
|
||||
mkdir -p root/usr/share/applications/
|
||||
sed "s/{VERSION}/$VERSION/" openra-ra.desktop > root/usr/share/applications/openra-ra.desktop
|
||||
sed "s/{VERSION}/$VERSION/" openra-cnc.desktop > root/usr/share/applications/openra-cnc.desktop
|
||||
|
||||
# Menu entries
|
||||
mkdir -p root/usr/share/menu/
|
||||
cp openra-ra root/usr/share/menu/
|
||||
cp openra-cnc root/usr/share/menu/
|
||||
|
||||
# Icon images
|
||||
mkdir -p root/usr/share/pixmaps/
|
||||
cp openra.32.xpm root/usr/share/pixmaps/
|
||||
mkdir -p root/usr/share/icons/
|
||||
cp -r hicolor root/usr/share/icons/
|
||||
|
||||
(
|
||||
echo "Building Debian package."
|
||||
cd deb
|
||||
./buildpackage.sh "$VERSION" ../root "$PACKAGEDIR" &> package.log
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Debian package build failed, refer to $PWD/package.log."
|
||||
fi
|
||||
) &
|
||||
|
||||
# (
|
||||
# echo "Building Arch-Linux package."
|
||||
# pushd pkgbuild/ &> /dev/null
|
||||
# sh buildpackage.sh "$VERSION" "$PACKAGEDIR" &> package.log
|
||||
# if [ $? -ne 0 ]; then
|
||||
# echo "Arch-Linux package build failed, refer to $PWD/package.log."
|
||||
# fi
|
||||
# popd &> /dev/null
|
||||
# ) &
|
||||
#
|
||||
# (
|
||||
# echo "Building RPM package."
|
||||
# pushd rpm/ &> /dev/null
|
||||
# sh buildpackage.sh "$VERSION" ~/rpmbuild "$PACKAGEDIR" &> package.log
|
||||
# if [ $? -ne 0 ]; then
|
||||
# echo "RPM package build failed, refer to $PWD/package.log."
|
||||
# fi
|
||||
# popd &> /dev/null
|
||||
# ) &
|
||||
#
|
||||
wait
|
||||
|
||||
# Clean up
|
||||
rm -rf root
|
||||
@@ -1,16 +1,3 @@
|
||||
openra (20100914) unstable; urgency=low
|
||||
openra ({VERSION}) unstable; urgency=low
|
||||
|
||||
* Changed MiG prerequisites to AFLD+STEK
|
||||
* Removed KENN, build DOG directly from BARR now
|
||||
* Chronotank can only teleport when fully charged
|
||||
* Improved OpenGL error logging
|
||||
* Fixed targeting of FIX
|
||||
* Fixed crash when an engineer is trying to repair a building, but it dies/gets sold/etc.
|
||||
* Added muzzle flashes to Yak and Hind chainguns * Fixed bounding boxes on some units
|
||||
* Fixed accuracy of Tesla weapons
|
||||
* Changed ownership of GUN and GTWR in CNC to both
|
||||
* Fixed crash on destroying things that have a building reserved
|
||||
* If ordered to move to an unpathable cell, move somewhere nearby that is pathable instead
|
||||
* Fixed RPM linux package
|
||||
|
||||
-- Maikel van den Hout <ma1kelvdh@gmail.com> Thu, 09 Sep 2010 16:34:03 +0200
|
||||
* The changelog is available at http://www.sleipnirstuff.com/forum/viewtopic.php?f=81&t=14844
|
||||
@@ -1,14 +1,15 @@
|
||||
Package: openra
|
||||
Version: 20100914
|
||||
Version: {VERSION}
|
||||
Architecture: all
|
||||
Maintainer: Matthew Bowra-Dean <matthew@ijw.co.nz>
|
||||
Uploaders: Maikel van den Hout <ma1kelvdh@gmail.com>
|
||||
Installed-Size: 8306
|
||||
Installed-Size: {SIZE}
|
||||
Depends: nvidia-cg-toolkit (>= 2.1), libopenal1, mono-runtime, libmono-winforms2.0-cil, libfreetype6, libsdl1.2debian, libgl1-mesa-glx, libgl1-mesa-dri, zenity, wget, unzip
|
||||
Section: games
|
||||
Priority: extra
|
||||
Homepage: http://www.open-ra.org/
|
||||
Description: A multiplayer reimplementation of the Command & Conquer: Red Alert game engine in .NET/Mono, OpenGL, OpenAL and SDL. Has extensive modding support and includes Command & Conquer as an official mod.
|
||||
.
|
||||
Please note: OpenRA is currently at an alpha release stage. If you have any problems, please report them to the IRC channel (#openra on
|
||||
irc.freenode.net) or the bug-tracker (http://red-bull.ijw.co.nz:3690/OpenRA).
|
||||
Please note: OpenRA is currently at an alpha release stage. Releases may be buggy
|
||||
or unstable. If you have any problems, please report them to the IRC channel (#openra on
|
||||
irc.freenode.net) or the bug-tracker (http://bugs.open-ra.org).
|
||||
|
||||
@@ -13,8 +13,7 @@ anw=`zenity --question --text "Download and install RA packages?"; echo $?`
|
||||
if [ $anw = 0 ] ; then
|
||||
mono OpenRA.Utility.exe --download-packages=ra
|
||||
else
|
||||
zenity --info --text "The RA packages will need to be manually extracted from http://open-ra.org/get-dependency.php?file=ra-packages \
|
||||
to /usr/share/openra/mods/ra/packages before the RA mod will work."
|
||||
zenity --info --text "The Red Alert packages need to be manually installed before it will work.\nSee the OpenRA website for more information."
|
||||
break
|
||||
fi
|
||||
|
||||
@@ -23,15 +22,6 @@ anw=`zenity --question --text "Download and install C&C packages?"; echo $?`
|
||||
if [ $anw = 0 ] ; then
|
||||
mono OpenRA.Utility.exe --download-packages=cnc
|
||||
else
|
||||
zenity --info --text "The C&C packages will need to be manually extracted from http://open-ra.org/get-dependency.php?file=cnc-packages \
|
||||
to /usr/share/openra/mods/cnc/packages before the C&C mod will work."
|
||||
zenity --info --text "The C&C packages need to be manually installed before it will work.\nSee the OpenRA website for more information."
|
||||
break
|
||||
fi
|
||||
|
||||
gacutil -i thirdparty/Tao/Tao.Cg.dll
|
||||
gacutil -i thirdparty/Tao/Tao.FreeType.dll
|
||||
gacutil -i thirdparty/Tao/Tao.OpenAl.dll
|
||||
gacutil -i thirdparty/Tao/Tao.OpenGl.dll
|
||||
gacutil -i thirdparty/Tao/Tao.Sdl.dll
|
||||
|
||||
cd $start_directory
|
||||
|
||||
@@ -1,57 +1,34 @@
|
||||
#!/bin/bash
|
||||
ARGS=7
|
||||
# OpenRA packaging script for Mac OSX
|
||||
E_BADARGS=85
|
||||
|
||||
if [ $# -ne "$ARGS" ]
|
||||
if [ $# -ne "3" ]
|
||||
then
|
||||
echo "Usage: `basename $0` ftp-server ftp-path username password version src-dir temp-packaging-dir"
|
||||
echo "Usage: `basename $0` version root-dir outputdir"
|
||||
exit $E_BADARGS
|
||||
fi
|
||||
VERSION=$1
|
||||
|
||||
PKGVERSION=`echo $5 | sed "s/-/\\./g"`
|
||||
|
||||
# Delete lines and insert updated ones for version
|
||||
sed -i '2,2 d' DEBIAN/control
|
||||
sed -i "2,2 i\Version: $PKGVERSION" DEBIAN/control
|
||||
sed -i '1,1 d' DEBIAN/changelog
|
||||
sed -i "1,1 i\openra ($PKGVERSION) unstable; urgency=low" DEBIAN/changelog
|
||||
|
||||
# Get the size needed for the Installed-Size line and change it
|
||||
sed -i '6,6 d' DEBIAN/control
|
||||
PACKAGE_SIZE=`du --apparent-size -c $6/usr | grep total | sed 's/[a-z]//g' | sed 's/\ //g'`
|
||||
sed -i "6,6 i\Installed-Size: $PACKAGE_SIZE" DEBIAN/control
|
||||
# HACK: bsd du doesn't like --apparant-size; remember to add back when running on debian
|
||||
PACKAGE_SIZE=`du -c $2/usr | grep "total" | awk '{print $1}'`
|
||||
|
||||
# Copy our two needed folders to a clean package directory (yes, this is needed)
|
||||
mkdir $7
|
||||
cp -R DEBIAN $7
|
||||
cp -R $6/usr $7
|
||||
mkdir root
|
||||
cp -R DEBIAN root
|
||||
cp -R $2/usr root
|
||||
|
||||
# Build it in the package directory, but place the finished deb in our starting directory
|
||||
BUILD_DIR=$( pwd )
|
||||
pushd $7
|
||||
# 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/changelog > root/DEBIAN/changelog
|
||||
|
||||
# Build it in the temp directory, but place the finished deb in our starting directory
|
||||
pushd root
|
||||
|
||||
# Calculate md5sums and clean up the /usr/ part of them
|
||||
md5sum `find . -type f | grep -v '^[.]/DEBIAN/'` >DEBIAN/md5sums
|
||||
sed -i '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 directory the script was executed in
|
||||
dpkg-deb -b . $BUILD_DIR/openra-$PKGVERSION.deb
|
||||
|
||||
# Get back to begin directory
|
||||
# Start building, the file should appear in the output directory
|
||||
dpkg-deb -b . $3/openra-$VERSION.deb
|
||||
|
||||
# Clean up
|
||||
popd
|
||||
|
||||
# Get package file and dump it on ftp
|
||||
|
||||
PACKAGEFILE=openra-$PKGVERSION.deb
|
||||
size=`stat -c "%s" $PACKAGEFILE`
|
||||
|
||||
echo "$5,$size,$PACKAGEFILE" > /tmp/deblatest.txt
|
||||
|
||||
wput $PACKAGEFILE "ftp://$3:$4@$1/$2/"
|
||||
cd /tmp
|
||||
wput -u deblatest.txt "ftp://$3:$4@$1/$2/"
|
||||
|
||||
# remove temp-packaging-dir
|
||||
|
||||
rm -rf $7
|
||||
rm -rf root
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=20100907-1
|
||||
Version={VERSION}
|
||||
Name=OpenRA - Command & Conquer
|
||||
Comment=The OpenRA RTS engine running Command & Conquer
|
||||
Icon=openra
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=20100907-1
|
||||
Version={VERSION}
|
||||
Name=OpenRA - Red Alert
|
||||
Comment=The OpenRA RTS engine running Red Alert
|
||||
Icon=openra
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
#!/bin/bash
|
||||
ARGS=5
|
||||
E_BADARGS=85
|
||||
|
||||
if [ $# -ne "$ARGS" ]
|
||||
if [ $# -ne "2" ]
|
||||
then
|
||||
echo "Usage: `basename $0` ftp-server ftp-path username password version"
|
||||
echo "Usage: `basename $0` version outputdir"
|
||||
exit $E_BADARGS
|
||||
fi
|
||||
|
||||
PKGVERSION=`echo $5 | sed "s/-/\\./g"`
|
||||
PKGVERSION=`echo $1 | sed "s/-/\\./g"`
|
||||
sed -i "s/pkgver=[0-9\\.]\+/pkgver=$PKGVERSION/" PKGBUILD
|
||||
|
||||
makepkg --holdver
|
||||
@@ -16,12 +14,4 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PACKAGEFILE="openra-git-$PKGVERSION-1-any.pkg.tar.xz"
|
||||
|
||||
size=`stat -c "%s" $PACKAGEFILE`
|
||||
|
||||
echo "$5,$size,$PACKAGEFILE" > archlatest.txt
|
||||
|
||||
wput $PACKAGEFILE "ftp://$3:$4@$1/$2/"
|
||||
wput -u archlatest.txt "ftp://$3:$4@$1/$2/"
|
||||
|
||||
mv openra-git-$PKGVERSION-1-any.pkg.tar.xz $2
|
||||
@@ -1,18 +1,16 @@
|
||||
#!/bin/bash
|
||||
ARGS=6
|
||||
E_BADARGS=85
|
||||
|
||||
if [ $# -ne "$ARGS" ]
|
||||
if [ $# -ne "3" ]
|
||||
then
|
||||
echo "Usage: `basename $0` ftp-server ftp-path username password version packaging-dir"
|
||||
echo "Usage: `basename $0` version packaging-dir outputdir"
|
||||
exit $E_BADARGS
|
||||
fi
|
||||
|
||||
PKGVERSION=`echo $5 | sed "s/-/\\./g"`
|
||||
PKGVERSION=`echo $1 | sed "s/-/\\./g"`
|
||||
sed -i "s/%define version [0-9\\.]\+/%define version $PKGVERSION/" openra.spec
|
||||
cp openra.spec "$6/SPECS/"
|
||||
cp openra.spec "$2/SPECS/"
|
||||
|
||||
cd "$6"
|
||||
cd "$2"
|
||||
|
||||
rpmbuild --target noarch -bb SPECS/openra.spec
|
||||
if [ $? -ne 0 ]; then
|
||||
@@ -20,12 +18,4 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
|
||||
cd RPMS/noarch/
|
||||
PACKAGEFILE=openra-$PKGVERSION-1.noarch.rpm
|
||||
size=`stat -c "%s" $PACKAGEFILE`
|
||||
|
||||
echo "$5,$size,$PACKAGEFILE" > /tmp/rpmlatest.txt
|
||||
|
||||
wput $PACKAGEFILE "ftp://$3:$4@$1/$2/"
|
||||
cd /tmp
|
||||
wput -u rpmlatest.txt "ftp://$3:$4@$1/$2/"
|
||||
|
||||
mv openra-$PKGVERSION-1.noarch.rpm $3
|
||||
|
||||
Reference in New Issue
Block a user