Forum



scheich am 10.11.2012 14:25 #10825


Hi all,

short tutorial about creating a ready to install .deb for Debian stable/testing.
Perhaps somebody needs this. If not, this is for my own mind :-D

Tested with Debian Testing(Wheezy) on amd64.

First install the dependencies, you need:
Code:
sudo aptitude install cmake bzr libsdl1.2-dev libsdl-mixer1.2-dev liblua5.2-dev libminiupnpc-dev libcurl4-gnutls-dev libbz2-dev gettext


I also had to symlink lua:
Code:
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.2.a /usr/lib/liblua5.2.a


Navigate to a place, where you want to store the source and checkout: (takes some minutes)
Code:
bzr branch lp:s25rttr

Go to the build dir and try to start ./cmake.sh
Code:
cd s25rttr/build
./cmake.sh

If everything is fine you can start compiling with: (took me less then 10 Minutes on a Core2Duo laptop with 3GB RAM)
Code:
make -j3


If you get 100% and no errors (ignore some warnings :-D) you have sucessfully build s25rttr. :-)


NOW you can either install it directly to your system:
Code:
sudo make install


OR

Create a ready to install .deb-package:
Code:
sudo aptitude install checkinstall


This should create the package without install it to your system, replace $revision withe actual number(e.g. 8493) and $version with the date ( e.g. 20121110).

I searched for a way to fetch these two variables automatically, found this in bzr, propaply there is a much safer way to do this:
Code:
lastrevision=`exec cat ../.bzr/branch/last-revision`
version=`echo $lastrevision | awk -F- '{sub("-","");print $2}' | cut -c1-8`
revision=${lastrevision% *}


And start:
Code:
sudo checkinstall --install=no --pkgname=s25rttr --pkgrelease=$revision --pkgversion=$version --pkglicense=GPLv3 --pkggroup=games --maintainer=$whoami --nodoc --backup=no


If checkinstall do its job without errors you will get a .deb in the builds-dir. Install it with:
Code:
dpkg -i build/s25rttr_20121110_8493_amd64.deb


Dont forget you need the original game data to play this wonderful game, before you can play put the the DATA and GFX dirs to:
Code:
/usr/local/share/s25rttr/S2/


and set the permissions:
Code:
sudo chmod 755 -R /usr/local/share/s25rttr/S2/



Last but not least a script you can place in s25rttr/ to fetch the newest version, compile and generate the deb:
Code:
bzr pull
lastrevision=`exec cat .bzr/branch/last-revision`
version=`echo $lastrevision | awk -F- '{sub("-","");print $2}' | cut -c1-8`
revision=${lastrevision% *}
cd build/
./cleanup.sh
./cmake.sh
make -j3
sudo checkinstall --install=no --pkgname=s25rttr --pkgrelease=$revision --pkgversion=$version --pkglicense=GPLv3 --pkggroup=games --maintainer=$whoami --nodoc --backup=no -y


Have fun! And please report, if somehting is wrong here. Thanks

Greetz,
scheich

Editiert von scheich am 06.01.2013 16:13

FloSoft am 10.11.2012 16:26 #10826

Großmeister
Hi,

normally you should simply call a "dpkg-buildpackage" inside of the checked-out bzr branch.

[edit]
sorry - you should use bzr-buildpackage/bzr-builddeb instead of the "normal" dpkg variant
[/edit]

---
mfg
Flo


Editiert von FloSoft am 10.11.2012 19:04

scheich am 10.11.2012 18:18 #10827


That gives me:

Code:
dpkg-source: Fehler: unmöglich, mit Quellformat »3.0 (quilt)« zu bauen: unter ../s25rttr_20121102.orig.tar.{bz2,gz,lzma,xz} wurde kein Tarball der Originalautoren gefunden
dpkg-buildpackage: Fehler: Fehler-Exitstatus von dpkg-source -b s25rttr war 255



BTW, it seems that the Ubuntu autocompiler on launchpad increased the glibc-version. In Debian theres only 2.13 available, thats the reason why I started building it by myself. :-/

What about packages.siedler25.org?


FloSoft am 10.11.2012 19:06 #10828

Großmeister
yes karmic is not available anymore, so I think it uses a more recent version on launchpad.

packages.siedler25.org was once a mirror of the launchpad ppa.

I think I will set up the buildservice myself again and for debian variants too

---
mfg
Flo



scheich am 11.11.2012 13:10 #10829


Yes, I used that repo, thats why I asked. Would be great to get the nightlys there.

Thank you!




Feel free to post in English!

Antwort schreiben

Username:
Security code:
Text:

   
  Convert smilies like :), ;) etc. into small graphics?
  Convert WWW-addresses into clickable links?
  Soll Boardcode in ihrer Nachricht aktiviert werden?