Go Back   Champions of Regnum > English > Technical Support > Linux

Linux Technical issues under Linux platform

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 10-17-2009, 04:54 PM   #1
onemyndseye
Master
 
onemyndseye's Avatar
 
Join Date: Jul 2008
Location: South Central USA
Posts: 260
onemyndseye is on a distinguished road
Default Debian Package build scripts

For anyone interested and to preserve them in the event that something happens to my build machine or my ability to continue providing these packages I thought I would post the simple build script that I use for these packages.


The build directories contents are as follows:
Code:
./i386
./i386/etc
./i386/etc/default
./i386/etc/default/regnum-online
./i386/usr
./i386/usr/bin
./i386/usr/bin/regnum-online
./i386/usr/share
./i386/usr/share/menu
./i386/usr/share/menu/regnum-online
./i386/usr/share/applications
./i386/usr/share/applications/regnum-online.desktop
./i386/usr/share/doc
./i386/usr/share/doc/regnum-online
./i386/usr/share/doc/regnum-online/License.txt
./build.sh
./amd64
./amd64/etc
./amd64/etc/default
./amd64/etc/default/regnum-online
./amd64/usr
./amd64/usr/bin
./amd64/usr/bin/regnum-online
./amd64/usr/share
./amd64/usr/share/menu
./amd64/usr/share/menu/regnum-online
./amd64/usr/share/applications
./amd64/usr/share/applications/regnum-online.desktop
./amd64/usr/share/doc
./amd64/usr/share/doc/regnum-online
./amd64/usr/share/doc/regnum-online/License.txt
./data
./data/opt
./data/opt/regnum-online
./data/opt/regnum-online/regnum-data.tar.gz
./data/opt/regnum-online/License.txt
./data/opt/regnum-online/regnum_32x32.xpm

./data/opt/regnum-online/regnum-data.tar.gz contains the needed data resources archived by hand (currently) from a known stable RO install tested in all 3 realms to ensure that all needed resources are included. Sounds redundant, but I have run into cases where, for example, loging in to Alusis realm after a "Update all resources at once" in syrtis the resource server pushes me afew more files.

Still waiting for Surak to give me permission to scrape the needed files from the patch server... That will simplify this process alot in the sense that I'll no longer have to hand archive anything and will be able to provide a better supported package since I can then included the needed libs and such from the ./live/ folder

Contents of build.sh
Code:
#!/bin/bash
#
# Regnum Online package build script
#

# Set package version by build date
VERSION=$(date +%y%m%d)


####################  i386 #######################
## 32bit
mkdir ./tmp32
mkdir ./tmp32/DEBIAN
touch ./tmp32/DEBIAN/rules
touch ./tmp32/DEBIAN/control
touch ./tmp32/DEBIAN/changelog

cp -avr ./i386/* ./tmp32/.


# 32 bit
mkdir -p ./tmp32/opt/regnum-online
wget http://download01.regnumonline.com.ar/autopatch/launcher2_linux/rolauncher
chmod +x ./rolauncher
tar -cvzf ./rolauncher32.tar.gz ./rolauncher
mv ./rolauncher32.tar.gz ./tmp32/opt/regnum-online/.
rm ./rolauncher



cat <<EOF >./tmp32/DEBIAN/preinst
#!/bin/bash


[ ! -f /usr/lib32/libmumble.so.1 ] && ln -sf /usr/lib/mumble/libmumble.so.1 /usr/lib32/libmumble.so.1

exit 0

EOF

cat <<EOF >./tmp32/DEBIAN/postrm
#!/bin/bash

##
## nothing yet
##
exit 0

EOF

chmod +x ./tmp32/DEBIAN/preinst
chmod +x ./tmp32/DEBIAN/postrm

cat <<EOF >./tmp32/DEBIAN/control
Package: regnum-online
Priority: optional
Section: games
Installed-Size: 484188
Original-Maintainer: NGD Studios <http://www.regnumonlinegame.com/>
Maintainer: J. Whittington <onemyndseye@yahoo.com>
Architecture: i386
Version: $VERSION
Provides: regnum-online
Depends:  regnum-data (>= $VERSION), libgtk2.0-0 (>= 2.8.20), libglib2.0-0 (>= 2.10.2), libxt6 (>= 1:1.0.0), zenity, libopenal0 | libopenal0a | libopenal1
Suggests: libxevie1, mumble
Conflicts: regnum-online-installer
Homepage: http://regnumonlinegame.com/
Description: This package provides the 32bit binaries for Regnum Online.
  Regnum Online is a FREE TO PLAY (F2P) MMORPG inviting you to play with no 
  level or time restrictions. All that is required is that you fight for your realm
 .
  - Regnum offers 3 realms to choose from.
  - 9 fully customizable player characters.
  - An ever expanding number of quests.
  - The ability to capture forts and castles.
  - Expansive lands to explore.
  - Glorious graphical environments in DirectX and OpenGL.
  - Support for Windows and Linux platforms.
  - Premium content is available for enhanced game play.
 .
  - http://regnumonlinegame.com/
EOF


dpkg-deb -b ./tmp32/  ./regnum-online.deb
dpkg-name ./regnum-online.deb
rm -rfd ./tmp32/

#################### END  i386 ####################



####################  x64 ####################
## 64bit
mkdir ./tmp64
mkdir ./tmp64/DEBIAN
touch ./tmp64/DEBIAN/rules
touch ./tmp64/DEBIAN/control
touch ./tmp64/DEBIAN/changelog

cp -avr ./amd64/* ./tmp64/.


# x64
mkdir -p ./tmp64/opt/regnum-online
wget http://download01.regnumonline.com.ar/autopatch/launcher2_linux64/rolauncher
chmod +x ./rolauncher
tar -cvzf ./rolauncher64.tar.gz ./rolauncher
mv ./rolauncher64.tar.gz ./tmp64/opt/regnum-online/.
rm ./rolauncher



cat <<EOF >./tmp64/DEBIAN/preinst
#!/bin/bash


[ ! -f /usr/lib64/libmumble.so.1 ] && ln -sf /usr/lib/mumble/libmumble.so.1 /usr/lib32/libmumble.so.1

exit 0

EOF

cat <<EOF >./tmp64/DEBIAN/postrm
#!/bin/bash

##
## nothing yet
##
exit 0

EOF

chmod +x ./tmp64/DEBIAN/preinst
chmod +x ./tmp64/DEBIAN/postrm

cat <<EOF >./tmp64/DEBIAN/control
Package: regnum-online
Priority: optional
Section: games
Installed-Size: 484188
Original-Maintainer: NGD Studios <http://www.regnumonlinegame.com/>
Maintainer: J. Whittington <onemyndseye@yahoo.com>
Architecture: amd64
Version: $VERSION
Provides: regnum-online
Depends:  regnum-data (>= $VERSION), ia32-libs (>= 1.19), libgtk2.0-0 (>= 2.8.20), libglib2.0-0 (>= 2.10.2), libxt6 (>= 1:1.0.0), zenity, libopenal0 | libopenal0a | libopenal1
Suggests: libxevie1, mumble
Conflicts: regnum-online-installer
Homepage: http://regnumonlinegame.com/
Description: This package provides the 64bit binaries for Regnum Online.
  Regnum Online is a FREE TO PLAY (F2P) MMORPG inviting you to play with no 
  level or time restrictions. All that is required is that you fight for your realm
 .
  - Regnum offers 3 realms to choose from.
  - 9 fully customizable player characters.
  - An ever expanding number of quests.
  - The ability to capture forts and castles.
  - Expansive lands to explore.
  - Glorious graphical environments in DirectX and OpenGL.
  - Support for Windows and Linux platforms.
  - Premium content is available for enhanced game play.
 .
  - http://regnumonlinegame.com/
EOF


dpkg-deb -b ./tmp64/  ./regnum-online.deb
dpkg-name ./regnum-online.deb
rm -rfd ./tmp64/


#################### END  x64 ####################

#################### Data ####################
mkdir ./tmp
mkdir ./tmp/DEBIAN
touch ./tmp/DEBIAN/rules
touch ./tmp/DEBIAN/control
touch ./tmp/DEBIAN/changelog

cp -avr ./data/* ./tmp/.


cat <<EOF >./tmp/DEBIAN/preinst
#!/bin/bash


##
## nothing yet
##

exit 0

EOF

cat <<EOF >./tmp/DEBIAN/postrm
#!/bin/bash

##
## nothing yet
##
exit 0

EOF

chmod +x ./tmp/DEBIAN/preinst
chmod +x ./tmp/DEBIAN/postrm

cat <<EOF >./tmp/DEBIAN/control
Package: regnum-data
Priority: optional
Section: games
Installed-Size: 484188
Original-Maintainer: NGD Studios <http://www.regnumonlinegame.com/>
Maintainer: J. Whittington <onemyndseye@yahoo.com>
Architecture: all
Version: $VERSION
Provides: regnum-data
Depends:  regnum-online (>= $VERSION), libgtk2.0-0 (>= 2.8.20), libglib2.0-0 (>= 2.10.2), libxt6 (>= 1:1.0.0), zenity, libopenal0 | libopenal0a | libopenal1
Suggests: libxevie1, mumble
Conflicts: regnum-online-installer
Homepage: http://regnumonlinegame.com/
Description: This package provides the data files for Regnum Online.
  Regnum Online is a FREE TO PLAY (F2P) MMORPG inviting you to play with no 
  level or time restrictions. All that is required is that you fight for your realm
 .
  - Regnum offers 3 realms to choose from.
  - 9 fully customizable player characters.
  - An ever expanding number of quests.
  - The ability to capture forts and castles.
  - Expansive lands to explore.
  - Glorious graphical environments in DirectX and OpenGL.
  - Support for Windows and Linux platforms.
  - Premium content is available for enhanced game play.
 .
  - http://regnumonlinegame.com/
EOF


dpkg-deb -b ./tmp/  ./regnum-data.deb
dpkg-name ./regnum-data.deb
rm -rfd ./tmp/

exit 0

This script also presents a general example of hand building a deb package (i.e. when no makefile or debian rules are present for dpkg-buildpackage)


For clarity this is how the packages discussed Here are built.
__________________
RA/Syrtis Hunter LVL50: Elusis
RA/Syrtis Barba LVL50: Artemisia
RA/Syrtis Conju Lvl45: Nellas Miriel

Last edited by onemyndseye; 10-17-2009 at 06:02 PM.
onemyndseye no ha iniciado sesión   Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:43 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
NGD Studios 2002-2024 © All rights reserved