Hello, I would like to create a snap for gtk-gnutella. This is the script:
name: gtk-gnutella
version: ‘1.1.14’
summary: The Most Efficient Gnutella Client
description: |
gtk-gnutella is a server/client for the Gnutella peer-to-peer network.
It runs on Microsoft Windows, MacOS and every Unix-like system which supports GTK+ (1.2 or above)
grade: devel # must be ‘stable’ to release into candidate/stable channels
confinement: devmode # use ‘strict’ once you have the right plugs and slots
The reason for the empty snap is that you overrode build, and in this case you should also add the command to install the package. You can use something like:
override-build: |
./build.sh --prefix=/
make install INSTALL_PREFIX=$SNAPCRAFT_PART_INSTALL
since this specific buildsystem uses the INSTALL_PREFIX variable instead of DESTDIR to set the installation directory. To have consistent, reproducible builds, and to use all the features available in Snapcraft 3, it’s also a good idea to add base: core and the necessary stage packages to your snapcraft.yaml file.
Update: are you sure gtk-gnutella uses SDL and ALSA libraries?
Thank you, as told on IRC I was able to build a non-empty snap (not sure how to test it locally), however when I build it on snapcraft.io I get (2?) errors. The log should be here:
Adding gettext produced the first successful build on snapcraft.io!
Consequently I installed the published snap and gtk-gnutella started with a number of errors, probably related to missing files in the snap. The GUI also shows all squares instead of characters. This is what I get when launching from the console; how can I solve this?
(gtk-gnutella:11291): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file ‘/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache’: No such file or directory
This likely means that your installation is broken.
Try running the command
gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.
19-04-21 08:36:45.602 (WARNING): Couldn’t find pixmap file: smallserver.xpm
19-04-21 08:36:45.602 (WARNING): Couldn’t find pixmap file: upload.xpm
19-04-21 08:36:45.602 (WARNING): Couldn’t find pixmap file: download.xpm
19-04-21 08:36:45.602 (WARNING): Couldn’t find pixmap file: icon.16x16.xpm
19-04-21 08:36:46.309 (MESSAGE): BOOT will be contacting an UHC
19-04-21 08:37:07.943 (WARNING): prop_save_to_file(): could not stat “/home/lucio/snap/gtk-gnutella/5/.gtk-gnutella/config_gui”: ENOENT (No such file or directory)
Gtk applications are required to use the desktop-{gtk,gnome}* support part and launcher to handle runtime issues, refer Desktop App Support - GTK for more info.
the strange thing is that the snap is created including gtk2 when built locally, while the same yaml is not accepted in snapcraft (the build process does not start)…