Compiling ET:L on Debian 7

These instructions are intended for building a 32-bit ET:L on a 64-bit system but can also work on a 32-bit system.
  1. Install debootstrap and ET:L dependencies
    sudo apt-get install debootstrap libsdl1.2debian libogg0 libflac8 libdrm2 libglu1-mesa
    

    Note that ET:L 2.72 and above use SDL2 (as opposed to SDL1.2) and the SDL2 library comes with ET:L.
  2. Make a directory for the chroot
    mkdir chroot && cd chroot
    
  3. Create a 32 bit chroot. You can also substitute squeeze or sid
    sudo debootstrap –arch=i386 wheezy .
    
  4. Create a build directory inside the chroot tree
    sudo mkdir -p home/et/build
    sudo chmod 777 home/et
    cd home/et
    
  5. Download the source
    git clone git://github.com/etlegacy/etlegacy.git
    
  6. Install the bundled libraries from the git repo
    cd etlegacy
    git submodule init
    git submodule update
    cd ../../../
    
  7. Bind mount the required filesystems for compiling in the chroot
    sudo mount –bind /dev dev
    sudo mount –bind /proc proc
    sudo mount –bind /sys sys
    
  8. Enter the chroot
    sudo chroot .
    cd /home/et/build
    
  9. Install required build dependencies
    apt-get install build-essential cmake libsdl1.2-dev
    
  10. Build the source
    cmake -DBUNDLED_LIBS=YES -DBUNDLED_SDL=0 -DBUNDLED_JPEG=1 -DBUNDLED_LUA=1 -DBUNDLED_CURL=1 ../etlegacy
    
  11. After running cmake you can build
    make
    
  12. Assuming the build finished successfully, exit the chroot
    exit
    
  13. Now you should be able to run the game from the build directory (assuming that the data files pak0.pk3, pak1.pk3, pak2.pk3 and mp_bin.pk3 are installed)
If you run the game here, you will be unable to move the files to another directory.
./home/et/build/etl

Creating a debian package

Coming soon...