Merge pull request #1 from djam/knetworkmanager:rosa2019.1

Backports and update
This commit is contained in:
djam 2021-04-02 19:38:02 +00:00
commit a4ceab8ed4
2 changed files with 59 additions and 4 deletions

View file

@ -1,3 +1,5 @@
# DEPRECATED use plasma-nm insted
%define srcname networkmanagement
%define devname %mklibname -d knetworkmanager
@ -13,7 +15,7 @@
Summary: KDE NetworkManager
Name: knetworkmanager
Version: 0.9.0.12
Release: 5
Release: 7
Epoch: 2
License: (GPLv2+ or GPLv3+) and GPLv2+ and LGPLv2+ and LGPLv2+
Group: Graphical desktop/KDE
@ -25,11 +27,12 @@ Source100: knetworkmanager.rpmlintrc
Patch0: networkmanagement-0.9-useversion.patch
Patch1: networkmanagement-0.9-compile-po-files.patch
Patch4: networkmanagement-0.9.0.2-ui-fix.patch
# Newer NM changed libraries
Patch5: networkmanagement-0.9.0.12-brs.patch
BuildRequires: mobile-broadband-provider-info
BuildRequires: kdebase4-workspace-devel
BuildRequires: pkgconfig(libnm-util) >= 0.9
BuildRequires: pkgconfig(libnm-glib) >= 0.9
BuildRequires: pkgconfig(libnm)
%if %{openconnect}
BuildRequires: pkgconfig(openconnect) >= 3.10
%endif
@ -400,4 +403,3 @@ You need to use now the plasma applet.
Regards,
EOF

View file

@ -0,0 +1,53 @@
diff -ur networkmanagement-0.9.0.12.orig/CMakeLists.txt networkmanagement-0.9.0.12/CMakeLists.txt
--- networkmanagement-0.9.0.12.orig/CMakeLists.txt 2020-12-28 12:43:26.738814176 +0300
+++ networkmanagement-0.9.0.12/CMakeLists.txt 2020-12-28 13:14:32.038590757 +0300
@@ -24,32 +24,20 @@
#include(ConfigureChecks.cmake)
-find_package(NetworkManager ${MINIMUM_NM_VERSION_REQUIRED})
-
-if (NETWORKMANAGER_FOUND)
find_package(PkgConfig)
- PKG_SEARCH_MODULE( NM-UTIL libnm-util )
- PKG_SEARCH_MODULE( NM-GLIB libnm-glib )
+ PKG_SEARCH_MODULE( NM-UTIL libnm )
- if (NOT (NM-UTIL_FOUND AND NM-GLIB_FOUND))
- message(FATAL_ERROR "Could NOT find libnm-util or libnm-glib, check FindPkgConfig output above!")
- endif (NOT (NM-UTIL_FOUND AND NM-GLIB_FOUND))
+ if (NOT (NM-UTIL_FOUND))
+ message(FATAL_ERROR "Could NOT find libnm, check FindPkgConfig output above!")
+ endif (NOT (NM-UTIL_FOUND))
configure_file(backends/NetworkManager/config-nm09backend.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/backends/NetworkManager/config-nm09backend.h )
- if (${NETWORKMANAGER_VERSION} VERSION_GREATER ${MINIMUM_NM_VERSION_REQUIRED} OR
- ${NETWORKMANAGER_VERSION} VERSION_EQUAL ${MINIMUM_NM_VERSION_REQUIRED})
-
- if (${NETWORKMANAGER_VERSION} VERSION_LESS "0.9.8")
- message(WARNING "Unfortunately with NetworkManager < 0.9.8 we cannot correctly detect when the connection is deactivated (see http://bugs.kde.org/320533)")
- endif()
-
set(NM_0_9 TRUE)
add_definitions(-DMINIMUM_NM_VERSION_REQUIRED=\\"${MINIMUM_NM_VERSION_REQUIRED}\\")
include_directories(
${NETWORKMANAGER_INCLUDE_DIRS}
${NM-UTIL_INCLUDE_DIRS}
- ${NM-GLIB_INCLUDE_DIRS}
${CMAKE_CURRENT_BUILD_DIR}
solidcontrolfuture/libs
${KDE4_INCLUDE_DIR}/solid/control
@@ -69,12 +57,6 @@
#add_subdirectory(monolithic)
install( FILES networkmanagement.notifyrc DESTINATION ${DATA_INSTALL_DIR}/networkmanagement )
- else()
- message(FATAL_ERROR "ERROR: NetworkManager version '${NETWORKMANAGER_VERSION}' does not match minimum required (${MINIMUM_NM_VERSION_REQUIRED})")
- endif()
-else(NETWORKMANAGER_FOUND)
- message(FATAL_ERROR "ERROR: NetworkManager headers >= ${MINIMUM_NM_VERSION_REQUIRED} not installed. http://projects.gnome.org/NetworkManager/")
-endif(NETWORKMANAGER_FOUND)
if(INSTALL_KNM_AUTOSTART)
message("Installing autostart file for knm, use cmake -DINSTALL_KNM_AUTOSTART=ON to switch it on. Note that this will break the plasmoid. For this to work, make sure the kded DBus service is NOT loaded.")