!1 initial release

Merge pull request !1 from yangzhao_kl/initial_release
This commit is contained in:
openeuler-ci-bot 2020-07-23 19:59:52 +08:00 committed by Gitee
commit dd2537ac67
3 changed files with 157 additions and 0 deletions

BIN
libkscreen-5.15.5.tar.xz Normal file

Binary file not shown.

View File

@ -0,0 +1,60 @@
diff -up libkscreen-5.6.4/autotests/CMakeLists.txt.than libkscreen-5.6.4/autotests/CMakeLists.txt
--- libkscreen-5.6.4/autotests/CMakeLists.txt.than 2016-05-24 17:08:06.186036831 +0200
+++ libkscreen-5.6.4/autotests/CMakeLists.txt 2016-05-24 17:08:28.144385812 +0200
@@ -1,7 +1,5 @@
add_definitions(-DTEST_DATA="${CMAKE_CURRENT_SOURCE_DIR}/configs/")
-include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/tests/kwayland/)
-
macro(KSCREEN_ADD_TEST)
foreach(_testname ${ARGN})
set(test_SRCS ${_testname}.cpp ${KSCREEN_WAYLAND_SRCS})
@@ -25,16 +23,6 @@ set(KSCREEN_WAYLAND_LIBS
KF5::WaylandServer KF5::WaylandClient
)
-# For WaylandConfigReader and TestServer
-set(KSCREEN_WAYLAND_SRCS
- ${CMAKE_SOURCE_DIR}/tests/kwayland/waylandconfigreader.cpp
- ${CMAKE_SOURCE_DIR}/tests/kwayland/waylandtestserver.cpp
-)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../backends/kwayland)
-
-kscreen_add_test(testkwaylandbackend)
-kscreen_add_test(testkwaylandconfig)
-
set(KSCREEN_WAYLAND_LIBS "")
set(KSCREEN_WAYLAND_SRCS "")
diff -up libkscreen-5.6.4/backends/CMakeLists.txt.than libkscreen-5.6.4/backends/CMakeLists.txt
--- libkscreen-5.6.4/backends/CMakeLists.txt.than 2016-05-24 17:02:59.142120753 +0200
+++ libkscreen-5.6.4/backends/CMakeLists.txt 2016-05-24 17:03:05.579930820 +0200
@@ -1,6 +1,5 @@
add_subdirectory(fake)
add_subdirectory(qscreen)
-add_subdirectory(kwayland)
if(${XCB_RANDR_FOUND})
message(STATUS "Will build xrandr backend.")
diff -up libkscreen-5.6.4/CMakeLists.txt.than libkscreen-5.6.4/CMakeLists.txt
--- libkscreen-5.6.4/CMakeLists.txt.than 2016-05-24 17:03:58.179375794 +0200
+++ libkscreen-5.6.4/CMakeLists.txt 2016-05-24 17:04:13.841911809 +0200
@@ -19,10 +19,6 @@ include(CheckCXXCompilerFlag)
set(REQUIRED_QT_VERSION 5.2.0)
find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core DBus Gui Test X11Extras)
-# Wayland backend
-find_package(KF5Wayland CONFIG REQUIRED)
-add_feature_info("KF5Wayland" KF5Wayland_FOUND "Required for building libkscreen's KWayland backend")
-
# xrandr backend
find_package(XCB COMPONENTS XCB RANDR)
diff -up libkscreen-5.6.4/tests/CMakeLists.txt.than libkscreen-5.6.4/tests/CMakeLists.txt
--- libkscreen-5.6.4/tests/CMakeLists.txt.than 2016-05-24 17:07:03.588887505 +0200
+++ libkscreen-5.6.4/tests/CMakeLists.txt 2016-05-24 17:07:11.074666792 +0200
@@ -1,4 +1,2 @@
add_executable(printconfig testplugandplay.cpp testpnp.cpp)
target_link_libraries(printconfig Qt5::Gui KF5::Screen)
-
-add_subdirectory(kwayland)

97
libkscreen-qt5.spec Normal file
View File

@ -0,0 +1,97 @@
%global base_name libkscreen
Name: libkscreen-qt5
Summary: KDE display configuration library
Version: 5.15.5
Release: 1%{?dist}
License: GPLv2+
URL: https://cgit.kde.org/%{base_name}.git
%global revision %(echo %{version} | cut -d. -f3)
%if %{revision} >= 50
%global stable unstable
%else
%global stable stable
%endif
Source0: http://download.kde.org/%{stable}/plasma/%{version}/%{base_name}-%{version}.tar.xz
# Patch1: libkscreen-5.6.4-rhel-nowayland.patch
# filter plugin provides
%global __provides_exclude_from ^(%{_kf5_plugindir}/.*\\.so)$
BuildRequires: extra-cmake-modules
BuildRequires: kf5-rpm-macros
BuildRequires: kf5-kwayland-devel >= 5.22
BuildRequires: libX11-devel
BuildRequires: libxcb-devel
BuildRequires: libXrandr-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtx11extras-devel
Requires: kf5-filesystem
Provides: kf5-kscreen%{?_isa} = %{version}-%{release}
Provides: kf5-kscreen = %{version}-%{release}
Obsoletes: kf5-kscreen <= 1:5.2.0
%description
LibKScreen is a library that provides access to current configuration
of connected displays and ways to change the configuration.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: kf5-kscreen-devel = %{version}-%{release}
Provides: kf5-kscreen-devel%{?_isa} = %{version}-%{release}
Obsoletes: kf5-kscreen-devel <= 1:5.2.0
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q -n %{base_name}-%{version}
# %if 0%{?rhel}
# %patch1 -p1 -b .nowayland
# %endif
%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake_kf5} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%ldconfig_scriptlets
%files
%license COPYING
%{_kf5_bindir}/kscreen-doctor
%{_kf5_libexecdir}/kscreen_backend_launcher
%{_kf5_libdir}/libKF5Screen.so.5.*
%{_kf5_libdir}/libKF5Screen.so.7*
%{_kf5_plugindir}/kscreen/
%{_datadir}/dbus-1/services/org.kde.kscreen.service
%{_sysconfdir}/xdg/libkscreen.categories
%files devel
%{_kf5_includedir}/KScreen/
%{_kf5_includedir}/kscreen_version.h
%{_kf5_libdir}/libKF5Screen.so
%{_kf5_libdir}/cmake/KF5Screen/
%{_libdir}/pkgconfig/kscreen2.pc
%{_kf5_archdatadir}/mkspecs/modules/qt_KScreen.pri
%changelog
* Thu Jul 23 2020 Zhao Yang <yangzhao1@kylinos.cn> - 5.15.5-1
- Initial release for OpenEuler