Differences between revisions 7 and 8
Revision 7 as of 2014-01-09 09:29:29
Size: 2678
Editor: ?StevenHamilton
Comment:
Revision 8 as of 2014-01-09 09:43:13
Size: 3253
Editor: ?StevenHamilton
Comment:
Deletions are marked like this. Additions are marked like this.
Line 30: Line 30:
''''control'''' '''''control'''''
Line 34: Line 34:
''''copyright'''' '''''copyright'''''
Line 38: Line 38:
''''shell script'''' '''''shell script'''''
Line 40: Line 40:
Create a script to launch your game named ''foo''; Create a script in the debian directory to launch your game named ''foo'';
{{{
Line 44: Line 44:
}}}
'''''menu'''''
Line 45: Line 47:
''''menu''''
Line 47: Line 48:
{{{
Line 50: Line 51:
}}}
Line 51: Line 53:
''''manpage'''' '''''foo.desktop'''''

and a .desktop file
{{{
[Desktop Entry]
Name=foo
Comment=
Exec=foo
Icon=foo
Terminal=false
Type=Application
Categories=Game;ArcadeGame;
GenericName=
Keywords=game
}}}
'''''manpage'''''
Line 55: Line 72:
{{{
Line 74: Line 92:
}}}
Line 75: Line 94:
'''''foo.install'''''
Line 76: Line 96:
{{{
debian/foo usr/games
foo.love usr/share/games/foo
debian/foo.desktop usr/share/applications
}}}

'''''rules'''''

Finally the rules file.
{{{
#!/usr/bin/make -f

%:
 dh $@ -Pdebian/foo_build

#workaround for dh_installinit bug #719359
override_dh_installinit:
}}}

Translation(s): none


*DRAFT*

Packaging Love2d

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

Introduction

Love2d is a 2d game development framework for the Lua language. It feature 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.

Structure of a Love Distribution

Love games are distributed in a ".love" file. A ".love" is file 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. Basically we store the .love file under /usr/share/games/<package> and create a shell script to launch it against the love executable.

The following are example packaging files;

Where the name of the game is "foo"

control

Ensure depends include love

copyright

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 directory to launch your game named foo;

love /usr/share/games/foo/foo.love

menu

Create an entry to your script.

?package(foo):needs="X11" section="Games/Action" \
  title="foo" command="foo"

foo.desktop

and a .desktop file

[Desktop Entry]
Name=foo
Comment=
Exec=foo
Icon=foo
Terminal=false
Type=Application
Categories=Game;ArcadeGame;
GenericName=
Keywords=game

manpage

Create a manpage file named foo.1

.TH FOO 1 "August 17 2013"
.SH NAME
FOO \- Action platformer built in LOVE.
.SH SYNOPSIS
.B foo
.SH DESCRIPTION
This manual page documents briefly the
.B foo
command.
.PP
\\fBfoo\fP is a graphical action platform built using Lua and the LOVE framework.
.SH OPTIONS
This command executes a bash script of the foo.love package against the love
executable.
.SH SEE ALSO
.BR love (1),
.br
.SH AUTHOR
foo was written by FooBar Games.

foo.install

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

rules

Finally the rules file.

%:
        dh $@ -Pdebian/foo_build

#workaround for dh_installinit bug #719359
override_dh_installinit:


Games/Development