Updated linux packaging scripts to remove the need for post install actions and to use the launcher.
This commit is contained in:
committed by
Chris Forbes
parent
a3e67611e6
commit
ecea2471ca
@@ -15,7 +15,7 @@ rm -rf root
|
||||
|
||||
# Game files
|
||||
mkdir -p root/usr/bin/
|
||||
cp openra root/usr/bin/
|
||||
cp openra-bin root/usr/bin/openra
|
||||
mkdir -p root/usr/share/openra/
|
||||
cp -R $BUILTDIR/* "root/usr/share/openra/" || exit 3
|
||||
|
||||
@@ -24,13 +24,11 @@ rm root/usr/share/openra/OpenRA.Launcher.exe
|
||||
|
||||
# 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
|
||||
sed "s/{VERSION}/$VERSION/" openra.desktop > root/usr/share/applications/openra.desktop
|
||||
|
||||
# Menu entries
|
||||
mkdir -p root/usr/share/menu/
|
||||
cp openra-ra root/usr/share/menu/
|
||||
cp openra-cnc root/usr/share/menu/
|
||||
cp openra root/usr/share/menu/
|
||||
|
||||
# Icon images
|
||||
mkdir -p root/usr/share/pixmaps/
|
||||
|
||||
@@ -4,7 +4,7 @@ Architecture: all
|
||||
Maintainer: Matthew Bowra-Dean <matthew@ijw.co.nz>
|
||||
Uploaders: Maikel van den Hout <ma1kelvdh@gmail.com>, Paul Chote <sleipnir@sleipnirstuff.com>
|
||||
Installed-Size: {SIZE}
|
||||
Depends: libopenal1, mono-runtime, libmono-winforms2.0-cil, libfreetype6, libsdl1.2debian, libgl1-mesa-glx, libgl1-mesa-dri, zenity, wget, unzip
|
||||
Depends: libopenal1, mono-runtime, libmono-winforms2.0-cil, libfreetype6, libsdl1.2debian, libgl1-mesa-glx, libgl1-mesa-dri, libmono-i18n2.0-cil
|
||||
Section: games
|
||||
Priority: extra
|
||||
Homepage: http://www.open-ra.org/
|
||||
|
||||
@@ -5,25 +5,3 @@ if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
|
||||
update-menus
|
||||
fi
|
||||
# End automatically added section
|
||||
|
||||
start_directory=$( pwd )
|
||||
cd /usr/share/openra
|
||||
|
||||
anw=`zenity --question --text "Download and install RA packages?"; echo $?`
|
||||
if [ $anw = 0 ] ; then
|
||||
mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=ra-packages,/tmp/ra-packages.zip
|
||||
mono OpenRA.Utility.exe --extract-zip=/tmp/ra-packages.zip,ra/packages/
|
||||
else
|
||||
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
|
||||
|
||||
|
||||
anw=`zenity --question --text "Download and install C&C packages?"; echo $?`
|
||||
if [ $anw = 0 ] ; then
|
||||
mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=cnc-packages,/tmp/cnc-packages.zip
|
||||
mono OpenRA.Utility.exe --extract-zip=/tmp/cnc-packages.zip,cnc/packages/
|
||||
else
|
||||
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
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
#!/bin/sh
|
||||
cd /usr/share/openra
|
||||
mono /usr/share/openra/OpenRA.Game.exe SupportDir=~/.openra "$@"
|
||||
?package(openra):needs="X11" section="Games/Simulation" title="OpenRA"\
|
||||
command="/usr/bin/openra" icon="/usr/share/pixmaps/openra.32.xpm"
|
||||
|
||||
3
packaging/linux/openra-bin
Normal file
3
packaging/linux/openra-bin
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /usr/share/openra
|
||||
./gtklaunch
|
||||
@@ -1,2 +0,0 @@
|
||||
?package(openra):needs="X11" section="Games/Simulation" title="OpenRA - Command & Conquer"\
|
||||
command="/usr/bin/openra Game.Mods=cnc" icon="/usr/share/pixmaps/openra.32.xpm"
|
||||
@@ -1,9 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version={VERSION}
|
||||
Name=OpenRA - Command & Conquer
|
||||
Comment=The OpenRA RTS engine running Command & Conquer
|
||||
Icon=openra
|
||||
Exec=/usr/bin/openra Game.Mods=cnc
|
||||
Terminal=false
|
||||
Categories=Game;
|
||||
@@ -1,2 +0,0 @@
|
||||
?package(openra):needs="X11" section="Games/Simulation" title="OpenRA - Red Alert"\
|
||||
command="/usr/bin/openra Game.Mods=ra" icon="/usr/share/pixmaps/openra.32.xpm"
|
||||
@@ -1,9 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version={VERSION}
|
||||
Name=OpenRA - Red Alert
|
||||
Comment=The OpenRA RTS engine running Red Alert
|
||||
Icon=openra
|
||||
Exec=/usr/bin/openra Game.Mods=ra
|
||||
Terminal=false
|
||||
Categories=Game;
|
||||
11
packaging/linux/openra.desktop
Normal file
11
packaging/linux/openra.desktop
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version={VERSION}
|
||||
Name=OpenRA
|
||||
Comment=The OpenRA RTS engine launcher
|
||||
Icon=openra
|
||||
Exec=/usr/bin/openra
|
||||
Terminal=false
|
||||
Categories=Game;
|
||||
Name[en_NZ]=openra.desktop
|
||||
@@ -15,7 +15,6 @@ conflicts=()
|
||||
replaces=()
|
||||
backup=()
|
||||
options=()
|
||||
install=openra.install
|
||||
source=()
|
||||
noextract=()
|
||||
md5sums=()
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
# arg 1: the new package version
|
||||
post_install() {
|
||||
cd $pkgdir/usr/share/openra
|
||||
while true
|
||||
do
|
||||
read -s -n1 -p "Download and install RA packages? [Y/n]"
|
||||
case $REPLY in
|
||||
y|Y|"")
|
||||
mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=ra-packages,/tmp/ra-packages.zip
|
||||
mono OpenRA.Utility.exe --extract-zip=/tmp/ra-packages.zip,ra/packages/
|
||||
break;;
|
||||
n|N)
|
||||
echo "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."
|
||||
break;;
|
||||
*) echo "Please enter y or n.";;
|
||||
esac
|
||||
done
|
||||
|
||||
while true
|
||||
do
|
||||
read -s -n1 -p "Download and install C&C packages? [Y/n]"
|
||||
case $REPLY in
|
||||
y|Y|"")
|
||||
mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=cnc-packages,/tmp/cnc-packages.zip
|
||||
mono OpenRA.Utility.exe --extract-zip=/tmp/cnc-packages.zip,cnc/packages/
|
||||
break;;
|
||||
n|N)
|
||||
echo "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."
|
||||
break;;
|
||||
*) echo "Please enter y or n.";;
|
||||
esac
|
||||
done
|
||||
}
|
||||
@@ -28,38 +28,4 @@ cp -r %{root} $RPM_BUILD_ROOT
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
cd $RPM_BUILD_ROOT/usr/share/openra
|
||||
while true
|
||||
do
|
||||
read -s -n1 -p "Download and install RA packages? [Y/n]"
|
||||
case $REPLY in
|
||||
y|Y|"")
|
||||
mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=ra-packages,/tmp/ra-packages.zip
|
||||
mono OpenRA.Utility.exe --extract-zip=/tmp/ra-packages.zip,ra/packages/
|
||||
break;;
|
||||
n|N)
|
||||
echo "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."
|
||||
break;;
|
||||
*) echo "Please enter y or n.";;
|
||||
esac
|
||||
done
|
||||
|
||||
while true
|
||||
do
|
||||
read -s -n1 -p "Download and install C&C packages? [Y/n]"
|
||||
case $REPLY in
|
||||
y|Y|"")
|
||||
mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=cnc-packages,/tmp/cnc-packages.zip
|
||||
mono OpenRA.Utility.exe --extract-zip=/tmp/cnc-packages.zip,cnc/packages/
|
||||
break;;
|
||||
n|N)
|
||||
echo "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."
|
||||
break;;
|
||||
*) echo "Please enter y or n.";;
|
||||
esac
|
||||
done
|
||||
|
||||
%files
|
||||
|
||||
Reference in New Issue
Block a user