diff --git a/kauth.changes b/kauth.changes index 60764ef..70c6df7 100644 --- a/kauth.changes +++ b/kauth.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Jul 11 09:48:36 UTC 2014 - hrvoje.senjan@gmail.com + +- Define kf5_version within package + +------------------------------------------------------------------- +Thu Jul 10 18:19:58 UTC 2014 - hrvoje.senjan@gmail.com + +- Update polkit-qt5-support.patch to work with latest polkit-qt5-1 + ------------------------------------------------------------------- Tue Jul 1 21:36:06 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/kauth.spec b/kauth.spec index 8618fbf..9503935 100644 --- a/kauth.spec +++ b/kauth.spec @@ -20,10 +20,11 @@ Name: kauth Version: 5.0.0 Release: 0 +%define kf5_version %{version} BuildRequires: cmake >= 2.8.12 BuildRequires: extra-cmake-modules >= 1.0.0 BuildRequires: fdupes -BuildRequires: kcoreaddons-devel >= %{_kf5_version} +BuildRequires: kcoreaddons-devel >= %{kf5_version} BuildRequires: kf5-filesystem BuildRequires: libpolkit-qt5-1-devel BuildRequires: libqt5-linguist-devel >= 5.2.0 @@ -58,7 +59,7 @@ Summary: Framework which lets applications perform actions as a privilege Group: Development/Libraries/KDE Requires: %lname = %{version} Requires: extra-cmake-modules -Requires: kcoreaddons-devel >= %{_kf5_version} +Requires: kcoreaddons-devel >= %{kf5_version} %description devel KAuth is a framework to let applications perform actions as a privileged user. diff --git a/polkit-qt5-support.patch b/polkit-qt5-support.patch index 9295fc7..7fa883b 100644 --- a/polkit-qt5-support.patch +++ b/polkit-qt5-support.patch @@ -1,8 +1,23 @@ +From 09c745976fd75ac3330776cb14255de33500dc5b Mon Sep 17 00:00:00 2001 +From: Hrvoje Senjan +Date: Mon, 7 Jul 2014 21:39:46 +0200 +Subject: [PATCH 1/2] Switch to PolkitQt5-1 + +This will avoid problems where people +linked to Qt4 version of polkit-qt-1 + +REVIEW: 118264 +BUG: 337143 +--- + cmake/KF5AuthMacros.cmake | 2 +- + src/ConfigureChecks.cmake | 50 +++++++++++++++++++++++------------------------ + 2 files changed, 25 insertions(+), 27 deletions(-) + diff --git a/cmake/KF5AuthMacros.cmake b/cmake/KF5AuthMacros.cmake -index 4cdf3ab..1bff105 100644 +index 66ba949..ab0b30a 100644 --- a/cmake/KF5AuthMacros.cmake +++ b/cmake/KF5AuthMacros.cmake -@@ -37,7 +37,7 @@ function(KAUTH_INSTALL_ACTIONS HELPER_ID ACTIONS_FILE) +@@ -42,7 +42,7 @@ function(KAUTH_INSTALL_ACTIONS HELPER_ID ACTIONS_FILE) if(KAUTH_BACKEND_NAME STREQUAL "APPLE") get_target_property(kauth_policy_gen KF5::kauth-policy-gen LOCATION) install(CODE "execute_process(COMMAND ${kauth_policy_gen} ${ACTIONS_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})") @@ -12,7 +27,7 @@ index 4cdf3ab..1bff105 100644 get_filename_component(_input ${ACTIONS_FILE} ABSOLUTE) diff --git a/src/ConfigureChecks.cmake b/src/ConfigureChecks.cmake -index aff05ed..fcd26d5 100644 +index 9e13546..ff0d486 100644 --- a/src/ConfigureChecks.cmake +++ b/src/ConfigureChecks.cmake @@ -1,7 +1,7 @@ @@ -111,13 +126,13 @@ index aff05ed..fcd26d5 100644 ) - if (NOT POLKITQT-1_FOUND) - message ("WARNING: You chose the PolkitQt-1 KAuth backend but you don't have PolkitQt-1 installed. -+ if (NOT POLKITQT5-1_FOUND) ++ if (NOT PolkitQt5-1_FOUND) + message ("WARNING: You chose the PolkitQt5-1 KAuth backend but you don't have PolkitQt5-1 installed. Falling back to Fake backend") set (KAUTH_BACKEND "FAKE") - endif (NOT POLKITQT-1_FOUND) - endif (KAUTH_BACKEND STREQUAL "POLKITQT-1") -+ endif (NOT POLKITQT5-1_FOUND) ++ endif (NOT PolkitQt5-1_FOUND) + endif (KAUTH_BACKEND STREQUAL "POLKITQT5-1") endif(NOT KAUTH_BACKEND) @@ -127,18 +142,27 @@ index aff05ed..fcd26d5 100644 appropriate backend for your system" FORCE) # Add the correct libraries depending on the backend, and eventually set the policy files install location -@@ -139,8 +139,8 @@ elseif(KAUTH_BACKEND_NAME STREQUAL "POLKITQT") +@@ -139,16 +139,14 @@ elseif(KAUTH_BACKEND_NAME STREQUAL "POLKITQT") set(KAUTH_POLICY_FILES_INSTALL_DIR ${POLKITQT_POLICY_FILES_INSTALL_DIR} CACHE STRING "Where policy files generated by KAuth will be installed" FORCE) -elseif(KAUTH_BACKEND_NAME STREQUAL "POLKITQT-1") - message(STATUS "Building PolkitQt-1 KAuth backend") +- +- include_directories(${POLKITQT-1_INCLUDE_DIR}) +elseif(KAUTH_BACKEND_NAME STREQUAL "POLKITQT5-1") + message(STATUS "Building PolkitQt5-1 KAuth backend") - include_directories(${POLKITQT-1_INCLUDE_DIR}) + set(KAUTH_BACKEND_SRCS + backends/polkit-1/Polkit1Backend.cpp + ) -@@ -177,7 +177,7 @@ if(KAUTH_BACKEND_NAME STREQUAL "OSX") +- set(KAUTH_BACKEND_LIBS ${POLKITQT-1_CORE_LIBRARY} Qt5::DBus Qt5::Widgets) ++ set(KAUTH_BACKEND_LIBS PolkitQt5-1::Core Qt5::DBus Qt5::Widgets) + + # POLKITQT-1_POLICY_FILES_INSTALL_DIR has an absolute pathname, fix that. + string(REPLACE ${POLKITQT-1_INSTALL_DIR} +@@ -177,7 +175,7 @@ if(KAUTH_BACKEND_NAME STREQUAL "OSX") elseif(KAUTH_BACKEND_NAME STREQUAL "POLKITQT") set(KAUTH_POLICY_GEN_SRCS ${KAUTH_POLICY_GEN_SRCS} backends/policykit/kauth-policy-gen-polkit.cpp ) @@ -147,3 +171,6 @@ index aff05ed..fcd26d5 100644 set(KAUTH_POLICY_GEN_SRCS ${KAUTH_POLICY_GEN_SRCS} backends/polkit-1/kauth-policy-gen-polkit1.cpp ) set(KAUTH_POLICY_GEN_LIBRARIES ${KAUTH_POLICY_GEN_LIBRARIES} +-- +2.0.0 +