ebruck / radiotray-ng

An Internet radio player for Linux
GNU General Public License v3.0
257 stars 24 forks source link

Modifications for package release build on Debian testing (Debian 11) #165

Closed tkapias closed 3 years ago

tkapias commented 3 years ago

I just built the application on Debian testing (pre-11), there were 2 modifications to apply.

I'm going to use it and so I leave you a clue for future updates.

  1. Debian is moving from "appindicator3" to "ayatana-appindicator3".
  2. Debian, "testing" at least, does not offer libjsoncpp1 but libjsoncpp24.

I corrected 3 files and it works fine :

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9b3338..80aa2db 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,7 +67,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_D

 # notification & ncurses based on platform
 if (CMAKE_SYSTEM_NAME MATCHES "Linux")
-    pkg_search_module(APPINDICATOR REQUIRED appindicator3-0.1)
+    pkg_search_module(APPINDICATOR REQUIRED ayatana-appindicator3-0.1)
 if (NOT APPINDICATOR_FOUND)
     pkg_search_module(NCURSES      REQUIRED ncurses)
 endif()
diff --git a/package/CMakeLists.txt b/package/CMakeLists.txt
index 43476de..4a9e74f 100644
--- a/package/CMakeLists.txt
+++ b/package/CMakeLists.txt
@@ -48,7 +48,7 @@ if (LSB_RELEASE_EXECUTABLE)
         set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE  ${CPACK_SYSTEM_NAME})
         set(CPACK_DEBIAN_PACKAGE_PRIORITY      "optional")
         set(CPACK_DEBIAN_PACKAGE_MAINTAINER    "Edward G. Bruck <ed.bruck1@gmail.com>")
-        set(CPACK_DEBIAN_PACKAGE_DEPENDS       "libc6, libbsd0, libcurl4, libjsoncpp1, libxdg-basedir1, libnotify4, python3-lxml, libglibmm-2.4-1v5, libboost-filesystem${BOOST_DEB_VERSION}, libboost-system${BOOST_DEB_VERSION}, libboost-log${BOOST_DEB_VERSION}, libboost-thread${BOOST_DEB_VERSION}, libboost-program-options${BOOST_DEB_VERSION}, libgstreamer1.0-0, libappindicator3-1, gstreamer1.0-plugins-good, gstreamer1.0-plugins-bad, gstreamer1.0-plugins-ugly, libwxgtk3.0-gtk3-0v5")
+        set(CPACK_DEBIAN_PACKAGE_DEPENDS       "libc6, libbsd0, libcurl4, libjsoncpp24, libxdg-basedir1, libnotify4, python3-lxml, libglibmm-2.4-1v5, libboost-filesystem${BOOST_DEB_VERSION}, libboost-system${BOOST_DEB_VERSION}, libboost-log${BOOST_DEB_VERSION}, libboost-thread${BOOST_DEB_VERSION}, libboost-program-options${BOOST_DEB_VERSION}, libgstreamer1.0-0, libayatana-appindicator3-1, gstreamer1.0-plugins-good, gstreamer1.0-plugins-bad, gstreamer1.0-plugins-ugly, libwxgtk3.0-gtk3-0v5")
         set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${PROJECT_SOURCE_DIR}/package/postinst;${PROJECT_SOURCE_DIR}/package/postrm;${PROJECT_SOURCE_DIR}/package/conffiles)

         # no libcurl4 on Debian Stretch
diff --git a/src/radiotray-ng/gui/appindicator/appindicator_gui.hpp b/src/radiotray-ng/gui/appindicator/appindicator_gui.hpp
index b7bdd6b..fd21c3f 100644
--- a/src/radiotray-ng/gui/appindicator/appindicator_gui.hpp
+++ b/src/radiotray-ng/gui/appindicator/appindicator_gui.hpp
@@ -22,7 +22,7 @@
 #include <radiotray-ng/file_monitor.hpp>

 #include <gtk/gtk.h>
-#include <libappindicator/app-indicator.h>
+#include <libayatana-appindicator/app-indicator.h>
 #include <memory>

 class IConfig;
ghost commented 3 years ago

Thank you for your effort, works so far with Bullseye.

Only thing which is not working as expected, the 'radiotray-ng-off and radiotray-ng-on' icon in the panel stays light gray.

br

ebruck commented 3 years ago

@tkapias could you please generate a new build with my latest from the v0.2.8-dev branch? Hopefully I addressed your concerns. Thanks!

tkapias commented 3 years ago

cmake is fine now but make failed.

In file included from /Builds/bak/radiotray-ng/src/radiotray-ng/main.cpp:29:
/Builds/radiotray-ng/src/radiotray-ng/gui/appindicator/appindicator_gui.hpp:26:10: fatal error: libappindicator/app-indicator.h: Aucun fichier ou dossier de ce type
   26 | #include <libappindicator/app-indicator.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/radiotray-ng/CMakeFiles/radiotray-ng.dir/build.make:82 : src/radiotray-ng/CMakeFiles/radiotray-ng.dir/main.cpp.o] Erreur 1
make[1]: *** [CMakeFiles/Makefile2:382 : src/radiotray-ng/CMakeFiles/radiotray-ng.dir/all] Erreur 2
make: *** [Makefile:171 : all] Erreur 2

I'm not sure but there seems to be no problem with the definiton of AYATANA_APPINDICATOR, in src/radiotray-ng/gui/appindicator/appindicator_gui.hpp ifndef seems to not be evaluated, even if I invert it the error is the same.

ebruck commented 3 years ago

@tkapias thanks for testing. Please pull the latest from my dev branch. I setup a vm and can now build under bullseye.

tkapias commented 3 years ago

Still some problem, the build run fine but the package is still asking for libappindicator3-1 as dependency.

Build :

Scanning dependencies of target user-agent
[  2%] Generating rtng_user_agent.hpp
[  2%] Built target user-agent
Scanning dependencies of target appindicator_gui
[  4%] Building CXX object src/radiotray-ng/gui/appindicator/CMakeFiles/appindicator_gui.dir/appindicator_gui.cpp.o
[  7%] Linking CXX static library libappindicator_gui.a
[  7%] Built target appindicator_gui
Scanning dependencies of target config
[  9%] Building CXX object src/radiotray-ng/config/CMakeFiles/config.dir/config.cpp.o
[ 11%] Linking CXX static library libconfig.a
[ 11%] Built target config
Scanning dependencies of target playlist
[ 14%] Building CXX object src/radiotray-ng/playlist/CMakeFiles/playlist.dir/asf_decoder.cpp.o
[ 16%] Building CXX object src/radiotray-ng/playlist/CMakeFiles/playlist.dir/asx_decoder.cpp.o
[ 19%] Building CXX object src/radiotray-ng/playlist/CMakeFiles/playlist.dir/m3u_decoder.cpp.o
[ 21%] Building CXX object src/radiotray-ng/playlist/CMakeFiles/playlist.dir/ds_decoder.cpp.o
[ 23%] Building CXX object src/radiotray-ng/playlist/CMakeFiles/playlist.dir/pls_decoder.cpp.o
[ 26%] Building CXX object src/radiotray-ng/playlist/CMakeFiles/playlist.dir/ram_decoder.cpp.o
[ 28%] Building CXX object src/radiotray-ng/playlist/CMakeFiles/playlist.dir/xspf_decoder.cpp.o
[ 30%] Building CXX object src/radiotray-ng/playlist/CMakeFiles/playlist.dir/playlist_downloader.cpp.o
[ 33%] Linking CXX static library libplaylist.a
[ 33%] Built target playlist
Scanning dependencies of target bookmarks
[ 35%] Building CXX object src/radiotray-ng/bookmarks/CMakeFiles/bookmarks.dir/bookmarks.cpp.o
[ 38%] Linking CXX static library libbookmarks.a
[ 38%] Built target bookmarks
Scanning dependencies of target event_bus
[ 40%] Building CXX object src/radiotray-ng/event_bus/CMakeFiles/event_bus.dir/event_bus.cpp.o
[ 42%] Linking CXX static library libevent_bus.a
[ 42%] Built target event_bus
Scanning dependencies of target player
[ 45%] Building CXX object src/radiotray-ng/player/CMakeFiles/player.dir/player.cpp.o
[ 47%] Linking CXX static library libplayer.a
[ 47%] Built target player
Scanning dependencies of target notification
[ 50%] Building CXX object src/radiotray-ng/notification/CMakeFiles/notification.dir/linux/notification.cpp.o
[ 52%] Linking CXX static library libnotification.a
[ 52%] Built target notification
Scanning dependencies of target media_keys
[ 54%] Building CXX object src/radiotray-ng/extras/media_keys/CMakeFiles/media_keys.dir/linux/media_keys.cpp.o
[ 57%] Linking CXX static library libmedia_keys.a
[ 57%] Built target media_keys
Scanning dependencies of target rtng_dbus
[ 59%] Building CXX object src/radiotray-ng/extras/rtng_dbus/CMakeFiles/rtng_dbus.dir/rtng_dbus.cpp.o
[ 61%] Linking CXX static library librtng_dbus.a
[ 61%] Built target rtng_dbus
Scanning dependencies of target radiotray-ng
[ 64%] Building CXX object src/radiotray-ng/CMakeFiles/radiotray-ng.dir/main.cpp.o
[ 66%] Building CXX object src/radiotray-ng/CMakeFiles/radiotray-ng.dir/radiotray_ng.cpp.o
[ 69%] Linking CXX executable ../../radiotray-ng
[ 69%] Built target radiotray-ng
Scanning dependencies of target rtng-bookmark-editor
[ 71%] Building CXX object src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/editor_app.cpp.o
[ 73%] Building CXX object src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/editor_bookmarks.cpp.o
[ 76%] Building CXX object src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/editor_dialog_base.cpp.o
[ 78%] Building CXX object src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/editor_frame.cpp.o
[ 80%] Building CXX object src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/group_drop_target.cpp.o
[ 83%] Building CXX object src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/group_editor_dialog.cpp.o
[ 85%] Building CXX object src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/group_list.cpp.o
[ 88%] Building CXX object src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/image_list.cpp.o
[ 90%] Building CXX object src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/station_drop_target.cpp.o
[ 92%] Building CXX object src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/station_editor_dialog.cpp.o
[ 95%] Building CXX object src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/station_list.cpp.o
[ 97%] Building CXX object src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/status_dialog.cpp.o
[100%] Linking CXX executable ../../../../rtng-bookmark-editor
[100%] Built target rtng-bookmark-editor
Run CPack packaging tool...
CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinstall target for: radiotray-ng
CPack: - Install project: radiotray-ng []
CPack: Create package
CPack: - package: /home/tomasz/Builds/tests/radiotray-ng/build/radiotray-ng_0.2.8-dev_debian_testing_amd64.deb generated.

Package installation error (sorry it's in French ):

sudo dpkg -i ./radiotray-ng_0.2.8-dev_debian_testing_amd64.deb 
Sélection du paquet radiotray-ng précédemment désélectionné.
(Lecture de la base de données... 230151 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../radiotray-ng_0.2.8-dev_debian_testing_amd64.deb ...
Dépaquetage de radiotray-ng (0.2.8-dev) ...
dpkg: des problèmes de dépendances empêchent la configuration de radiotray-ng :
 radiotray-ng dépend de libappindicator3-1 ; cependant :
  Le paquet libappindicator3-1 n'est pas installé.

dpkg: erreur de traitement du paquet radiotray-ng (--install) :
 problèmes de dépendances - laissé non configuré
Traitement des actions différées (« triggers ») pour desktop-file-utils (0.26-1) ...
Traitement des actions différées (« triggers ») pour mailcap (3.68) ...
Traitement des actions différées (« triggers ») pour hicolor-icon-theme (0.17-2) ...
Des erreurs ont été rencontrées pendant l'exécution :
 radiotray-ng
ebruck commented 3 years ago

@tkapias please verify my latest change if you have the time.

tkapias commented 3 years ago

I confirm that the compilation and installation of the Debian package on Bullseye works correctly on v0.2.8-dev.

Thanks a lot.

PS : I didn't know that it was a feature, but I confirm @nostromo123 that the icon in the panel stays light gray at all time.

ebruck commented 3 years ago

I don't see that issue. Perhaps try removing the package and reinstall.