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
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
#!/bin/bash
|
||||
# OpenRA packaging script for Mac OSX
|
||||
|
||||
# Files to include in the package
|
||||
# Specified relative to the build-dir (argument $1)
|
||||
FILES="OpenRA.Game.exe OpenRA.Gl.dll OpenRA.FileFormats.dll FreeSans.ttf FreeSansBold.ttf titles.ttf shaders mods/ra mods/cnc VERSION"
|
||||
|
||||
# Files that match the above patterns, that should be excluded
|
||||
EXCLUDE="*.mdb"
|
||||
|
||||
if [ $# -ne "2" ]; then
|
||||
echo "Usage: `basename $0` build-dir version"
|
||||
if [ $# -ne "3" ]; then
|
||||
echo "Usage: `basename $0` version files-dir outputdir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -21,19 +15,13 @@ fi
|
||||
# Copy the template to build the game package
|
||||
# Assumes it is layed out with the correct directory structure
|
||||
cp -rv template.app OpenRA.app
|
||||
cp -R "$2/" "OpenRA.app/Contents/Resources/" || exit 3
|
||||
|
||||
for i in $FILES; do
|
||||
cp -Rv "$1/$i" "OpenRA.app/Contents/Resources/$i" || exit 3
|
||||
done
|
||||
# Remove the tao and WindowsBase dlls (which are shipped with the deps package)
|
||||
rm OpenRA.app/Contents/Resources/Tao.*
|
||||
rm OpenRA.app/Contents/Resources/WindowsBase.dll
|
||||
|
||||
# Delete excluded files
|
||||
pushd "OpenRA.app/Contents/Resources/" &> /dev/null
|
||||
for i in $EXCLUDE; do
|
||||
find . -path "$i" -delete
|
||||
done
|
||||
popd &> /dev/null
|
||||
|
||||
# Package app bundle into a zip
|
||||
zip OpenRA-$2 -r -9 OpenRA.app
|
||||
# Package app bundle into a zip and clean up
|
||||
zip OpenRA-$1 -r -9 OpenRA.app
|
||||
mv OpenRA-$1.zip $3
|
||||
rm -rf OpenRA.app
|
||||
echo "Done!"
|
||||
@@ -1,124 +1,79 @@
|
||||
#!/bin/bash
|
||||
msg () {
|
||||
echo -ne $1
|
||||
echo $2
|
||||
echo -ne "\E[0m"
|
||||
}
|
||||
# OpenRA master packaging script
|
||||
|
||||
TAG=$1
|
||||
|
||||
TYPE=`echo $TAG | grep -o "^[a-z]\\+"`
|
||||
VERSION=`echo $TAG | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
||||
|
||||
FTPSERVER=openra.res0l.net
|
||||
|
||||
export FTPSERVER
|
||||
|
||||
case "$TYPE" in
|
||||
"release")
|
||||
FTPPATH="openra.res0l.net/releases"
|
||||
;;
|
||||
"playtest")
|
||||
FTPPATH="openra.res0l.net/playtests"
|
||||
;;
|
||||
*)
|
||||
msg "\E[31m" "Unrecognized tag prefix $TYPE"
|
||||
if [ $# -ne "3" ]; then
|
||||
echo "Usage: `basename $0` tag srcdir outputdir"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
####### Windows #######
|
||||
(
|
||||
msg "\E[34m" "Building Windows package."
|
||||
pushd windows/ &> /dev/null
|
||||
makensis -DSRCDIR=/home/openra/openra-package/OpenRA-build OpenRA.nsi &> package.log
|
||||
if [ $? -eq 0 ]; then
|
||||
mv OpenRA.exe OpenRA-$VERSION.exe
|
||||
../uploader.sh windows "$VERSION" OpenRA-$VERSION.exe "$FTPPATH" "$2" "$3"
|
||||
else
|
||||
msg "\E[31m" "Windows package build failed, refer to $PWD/package.log."
|
||||
fi
|
||||
popd &> /dev/null
|
||||
) &
|
||||
|
||||
VERSION=`echo $1 | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
||||
SRCDIR=$2
|
||||
PACKAGEDIR=$3
|
||||
BUILTDIR="${SRCDIR}/packaging/built"
|
||||
|
||||
# Build the code and push the files into a clean dir
|
||||
cd "$SRCDIR"
|
||||
echo $1 > VERSION
|
||||
make game editor
|
||||
mkdir packaging/built
|
||||
mkdir packaging/built/mods
|
||||
|
||||
# List of files that are packaged on all platforms
|
||||
# Note that the Tao dlls are shipped on all platforms except osx
|
||||
# and that they are now installed to the game directory instead of being placed in the gac
|
||||
FILES="OpenRA.Game.exe OpenRA.Editor.exe OpenRA.Gl.dll OpenRA.FileFormats.dll FreeSans.ttf FreeSansBold.ttf titles.ttf shaders mods/ra mods/cnc VERSION"
|
||||
|
||||
# Files that match the above patterns, that should be excluded
|
||||
EXCLUDE="*.mdb"
|
||||
|
||||
for i in $FILES; do
|
||||
cp -R "$i" "packaging/built/$i" || exit 3
|
||||
done
|
||||
for i in $EXCLUDE; do
|
||||
find . -path "$i" -delete
|
||||
done
|
||||
|
||||
# Copy Tao
|
||||
cp thirdparty/Tao/* packaging/built
|
||||
|
||||
# Copy WindowsBase.dll for linux packages
|
||||
cp thirdparty/WindowsBase.dll packaging/built
|
||||
|
||||
# Change into packaging directory and run the platform-dependant packaging in parallel
|
||||
cd packaging
|
||||
|
||||
# ####### Windows #######
|
||||
# (
|
||||
# msg "\E[34m" "Building Windows package."
|
||||
# pushd windows/ &> /dev/null
|
||||
# makensis -DSRCDIR="$SRCDIR" OpenRA.nsi &> package.log
|
||||
# if [ $? -eq 0 ]; then
|
||||
# mv OpenRA.exe "$PACKAGEDIR"OpenRA-$VERSION.exe
|
||||
# else
|
||||
# msg "\E[31m" "Windows package build failed, refer to $PWD/package.log."
|
||||
# fi
|
||||
# popd &> /dev/null
|
||||
# ) &
|
||||
|
||||
####### OSX #######
|
||||
(
|
||||
msg "\E[34m" "Building OSX package."
|
||||
pushd osx/ &>/dev/null
|
||||
sh buildpackage.sh /home/openra/openra-package/OpenRA-build "$VERSION" &> package.log
|
||||
if [ $? -eq 0 ]; then
|
||||
../uploader.sh mac "$VERSION" OpenRA-$VERSION.zip "$FTPPATH" "$2" "$3"
|
||||
else
|
||||
msg "\E[31m" "OSX package build failed, refer to $PWD/package.log."
|
||||
fi
|
||||
popd &> /dev/null
|
||||
) &
|
||||
|
||||
####### *nix Builds #######
|
||||
(
|
||||
pushd linux &> /dev/null
|
||||
|
||||
#Desktop Icons
|
||||
BUILTDIR=../../../built
|
||||
mkdir -p $BUILTDIR/usr/share/applications/
|
||||
sed -i "3,3 d" openra-ra.desktop
|
||||
sed -i "3,3 i\Version=$VERSION" openra-ra.desktop
|
||||
sed -i "3,3 d" openra-cnc.desktop
|
||||
sed -i "3,3 i\Version=$VERSION" openra-cnc.desktop
|
||||
cp openra-ra.desktop $BUILTDIR/usr/share/applications/
|
||||
cp openra-cnc.desktop $BUILTDIR/usr/share/applications/
|
||||
|
||||
#Menu entries
|
||||
mkdir -p $BUILTDIR/usr/share/menu/
|
||||
cp openra-ra $BUILTDIR/usr/share/menu/
|
||||
cp openra-cnc $BUILTDIR/usr/share/menu/
|
||||
|
||||
#Icon images
|
||||
mkdir -p $BUILTDIR/usr/share/pixmaps/
|
||||
cp openra.32.xpm $BUILTDIR/usr/share/pixmaps/
|
||||
mkdir -p $BUILTDIR/usr/share/icons/
|
||||
cp -r hicolor $BUILTDIR/usr/share/icons/
|
||||
|
||||
popd &> /dev/null
|
||||
|
||||
(
|
||||
#Arch-Linux
|
||||
msg "\E[34m" "Building Arch-Linux package."
|
||||
pushd linux/pkgbuild/ &> /dev/null
|
||||
sh buildpackage.sh "$FTPSERVER" "$FTPPATH/linux" "$2" "$3" "$VERSION" &> package.log
|
||||
echo "Building OSX package."
|
||||
cd osx
|
||||
sh buildpackage.sh "$VERSION" "$BUILTDIR" "$PACKAGEDIR" &> package.log
|
||||
if [ $? -ne 0 ]; then
|
||||
msg "\E[31m" "Arch-Linux package build failed, refer to $PWD/package.log."
|
||||
echo "OSX package build failed, refer to $PWD/package.log."
|
||||
fi
|
||||
popd &> /dev/null
|
||||
) &
|
||||
|
||||
####### Linux #######
|
||||
(
|
||||
#RPM
|
||||
msg "\E[34m" "Building RPM package."
|
||||
pushd linux/rpm/ &> /dev/null
|
||||
sh buildpackage.sh "$FTPSERVER" "$FTPPATH/linux" "$2" "$3" "$VERSION" ~/rpmbuild &> package.log
|
||||
echo "Building linux common."
|
||||
cd linux
|
||||
sh buildpackage.sh "$VERSION" "$BUILTDIR" "$PACKAGEDIR" &> package.log
|
||||
if [ $? -ne 0 ]; then
|
||||
msg "\E[31m" "RPM package build failed, refer to $PWD/package.log."
|
||||
echo "linux package build failed, refer to $PWD/package.log."
|
||||
fi
|
||||
popd &> /dev/null
|
||||
) &
|
||||
|
||||
(
|
||||
#deb
|
||||
msg "\E[34m" "Building deb package."
|
||||
pushd linux/deb/ &> /dev/null
|
||||
./buildpackage.sh "$FTPSERVER" "$FTPPATH/linux" "$2" "$3" "$VERSION" ~/openra-package/built ~/debpackage &> package.log
|
||||
if [ $? -ne 0 ]; then
|
||||
msg "\E[31m" "deb package build failed, refer to $PWD/package.log."
|
||||
fi
|
||||
popd &> /dev/null
|
||||
) &
|
||||
|
||||
wait
|
||||
) &
|
||||
|
||||
wait
|
||||
|
||||
if [ "$TYPE" = "release" ]; then
|
||||
wput --basename=../ -u ../VERSION ftp://$2:$3@$FTPSERVER/$FTPPATH/master/
|
||||
fi
|
||||
rm -rf $BUILTDIR
|
||||
|
||||
Reference in New Issue
Block a user