Making a deb file dependent on SDL2

I am trying to release a zero cost multi-platform game. For Linux, I am
aiming for a deb file. I want to include a dependency on SDL2. I’m
building the deb and testing on Ubuntu 13.10 (saucy), because it
includes SDL2. My issue is that Ubuntu appears to have the SDL2 version
number embedded in the name of the library package (libsdl2-2.0-0). A
dependency on libsdl2 doesn’t work, I have to specify the version number
too in order to get the software manager to install the deb.

My problem is that I suspect that the next release of Ubuntu will
include a different version of SDL2, with a different name, and my
dependency will break.

Can anyone advise on how this is supposed to be handled? This is my
first foray into linux packaging, so any advice would be gratefully
received. I realise this is really probably more of an Ubuntu question
than an SDL2 one, but I’ve not got a reply in the Ubuntu forums and I
wondered if someone here might be facing similar issues.

Thanks,

Tony

You should not list them on your own, use:

Depends:
${misc:Depends},
${shlibs:Depends}

This should automagically use the correct package. And if sdl2 ever got
a minor update, it is doing the right things ™. Of course it will not
include SDL3.

If you really would like to specify the dependency manually, just use
libsdl2 without any version included. Or if you need a minimum version
do: libsdl2 (>=2.0)

Hope that helps.

MartinAm 12.11.2013 14:20, schrieb Tony Park:

I am trying to release a zero cost multi-platform game. For Linux, I
am aiming for a deb file. I want to include a dependency on SDL2. I’m
building the deb and testing on Ubuntu 13.10 (saucy), because it
includes SDL2. My issue is that Ubuntu appears to have the SDL2
version number embedded in the name of the library package
(libsdl2-2.0-0). A dependency on libsdl2 doesn’t work, I have to
specify the version number too in order to get the software manager to
install the deb.

My problem is that I suspect that the next release of Ubuntu will
include a different version of SDL2, with a different name, and my
dependency will break.

Can anyone advise on how this is supposed to be handled? This is my
first foray into linux packaging, so any advice would be gratefully
received. I realise this is really probably more of an Ubuntu question
than an SDL2 one, but I’ve not got a reply in the Ubuntu forums and I
wondered if someone here might be facing similar issues.

Thanks,

Tony


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org