Compliance with Debian guidelines

Started by SolarK, December 30, 2016, 12:46:00 PM

Previous topic - Next topic
December 30, 2016, 12:46:00 PM Last Edit: December 30, 2016, 01:33:40 PM by SolarK
Hello,

I am reviewing Solarus engine and editor as regards Debian game guidelines, maybe to ask for inclusion in Debian and ease installation. I am not a Debian packager myself, but I might ask for a sponsor to make the required packages.

The checklist is here:
https://wiki.debian.org/Games/Checklist

debian/copyright includes all the copyright and license texts for the code and data in the source package
All the game data (graphics, fonts, sounds, music, maps, texts, etc) in the source package are DFSG-free

Generated data is preferably built from source. If not, the sources must be in the package anyway. Here are some guidelines about that.
Game compiles with the CFLAGS defined in debian/rules
Game data is packaged in a separated arch indep (all) package if it's big enough
Game data is in a separate source package if it is large
The binary packages do not include any copy of fonts that are already packaged in font packages

Public executables are installed in /usr/games/, private executables under /usr/{lib,share}/games/<game>/

Private libraries installed in /usr/lib/games/<game>/
Game loads private libraries through rpath or LD_LIBRARY_PATH
Game links to public libraries in Debian instead of a private copy of them in its source code

Arch independent files are installed in /usr/share/games/<game>/
Arch independent data generation is independent of word length and endianess
Game loads game data from their absolute paths

Game should respect the XDG basedir spec

Game saves user data in $HOME/.<game>/ or similar

Game loads user data from $HOME/.<game>/ or similar

Game inits user data in $HOME/.<game>/ or similar if it is needed
Game loads game data independent of the arch endianness and word length
Game loads and saves user data independent of the arch endianness and word length
If the game is already in the repositories in a previous version, make sure that old data is not lost, either due to file format or to file location changes.
Patches include copyright and licensing texts
A .desktop file is present to start the game


So far, I bump on the following error:
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr/games ..
$ make -j4
$ sudo make install


then I run :

solarus-run
./solarus-run: error while loading shared libraries: libsolarus.so.1: cannot open shared object file: No such file or directory

A lot of people seem to have the same problem. Any clue?

Kind regards,
SolarK

Debian guidelines write: "Game loads private libraries through rpath or LD_LIBRARY_PATH"

Actually running:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/games/lib/x86_64-linux-gnu/

fixes the issue, but this is just a hack.
Any solution?

After typing "sudo make install", something strange is displayed:
-- Set runtime path of "/usr/games/lib/x86_64-linux-gnu/libsolarus-gui.so" to ""
-- Installing: /usr/local/bin/solarus

The errors lays somewhere in : solarus-1.5.1/cmake files
Can anyone help with debugging, my knowledge of cmake is too low.

I am not sure where libsolarus.so should be installed to respect the guidelines. For me it is a public library because other projects like the editor and the games need it.

December 30, 2016, 03:48:34 PM #5 Last Edit: December 30, 2016, 04:04:57 PM by SolarK
Strange:

$ cmake -DCMAKE_INSTALL_PREFIX=/usr/games -DCMAKE_INSTALL_LIBDIR=/usr/games/lib -DCMAKE_SKIP_RPATH='TRUE' ..

-- /usr/lib/w32api/usr/X11R6/lib/usr/lib/X11/usr/pkg/lib/opt/csw/lib/opt/lib/usr/openwin/lib
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:
    CMAKE_INSTALL_LIBDIR

cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib
doesn't work either

Only fhis works:
Quotecmake -DCMAKE_INSTALL_PREFIX=/usr

December 30, 2016, 04:09:47 PM #6 Last Edit: December 30, 2016, 04:20:53 PM by SolarK
As for solaris editor :
Quotecmake -DSOLARUS_INCLUDE_DIR=/usr/include/solarus -DSOLARUS_LIBRARY=/usr/lib/x86_64-linux-gnu/libsolarus.so.1 -DCMAKE_INSTALL_PREFIX=/usr  ..
also works