Translation(s): none

Packaging Love2d

This page describes the policy for including Love2d games in the Debian archive.


Love2d is a 2d game development framework for the Lua language. It features opengl graphics, audio, input handling, physics courtesy of box2d and all with the rapid development of Lua. It is ideal for beginning programming, prototyping, gamejams etc.

Already packaged games

The "apt-cache rdepends love" command on a system running testing/unstable will list all already packaged games. Currently there's only mrrescue. The git tree of this game is the best place to look for a most up-to-date example on how to package games.

Structure of a Love Distribution

Love games are distributed in a ".love" file. A ".love" file is simply a zip of your lua code and associated game data. Please see the Game Distribution page on the Love2d wiki for details on how to structure the content of your .love file. Please, keep in mind that when you're executing a .love file through love2d, you're executing actual code that can access your computer resources in many ways, just like any other program can, so make sure to only execute code you can trust.

Structure of the Debian Package

Since a love2d game comes packed in a single file, it's easy for us to standardise the debian packaging structure. To create the deb source package we unzip the upstream .love file. This allows us to patch the game as required. During package build process we recreate the .love file and install it under /usr/share/games/<package>. We also create a shell script to launch it against the love executable which is a dependency.

Where the name of the game is "foo"

File Structure

 /foo/LICENSE (upstream license)
 /foo/foo (directory of unzipped upstream .love)


Ensure depends include love and build-depends include "zip"


You must open up the .love file and capture the licensing of any included libraries (hardoncollider, middleclass, LUBE etc). Most are zlib and are found on the love2d wiki

shell script

Create a script in the debian/scripts directory to launch your game named foo;

   1 #!/bin/sh
   2 exec love /usr/share/games/foo/ "$@"


and a .desktop file

   1 [Desktop Entry]
   2 Name=foo
   3 Comment=
   4 Exec=foo
   5 Icon=foo
   6 Terminal=false
   7 Type=Application
   8 Categories=Game;ArcadeGame;
   9 GenericName=
  10 Keywords=game;


Create a manpage file named foo.6

   1 .TH FOO 1 "January 11 2014"
   2 .SH NAME
   3 FOO \- Action platformer built in LOVE.
   5 .B foo
   7 This manual page documents briefly the
   8 .B foo
   9 command.
  10 .PP
  11 \fBfoo\fP is a graphical action platform built using Lua and the LOVE framework.
  13 This command executes a
  14 .BR sh (1)
  15 script of the package against the love executable.
  17 .BR love (1)
  18 .br
  20 foo was written by FooBar Games.


debian/scripts/foo usr/games usr/share/games/foo
debian/foo.desktop usr/share/applications


   1 #!/usr/bin/make -f
   2 %:
   3         dh $@
   5 override_dh_auto_build:
   6         cd foo && env TZ=UTC zip -r -q -9 -X ../ .