File selenium-webdriver-at-spi.spec of Package selenium-webdriver-at-spi
#
# spec file for package selenium-webdriver-at-spi
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define kf6_version 5.240.0
%define qt6_version 6.5.0
# Full Plasma 6 version (e.g. 6.0.0)
%{!?_plasma6_bugfix: %define _plasma6_bugfix %{version}}
# Latest ABI-stable Plasma (e.g. 6.0 in KF6, but 6.0.80 in KUF)
%{!?_plasma6_version: %define _plasma6_version %(echo %{_plasma6_bugfix} | awk -F. '{print $1"."$2}')}
# Latest stable Applications (e.g. 17.08 in KA, but 17.11.80 in KUA)
%{!?_kapp_version: %define _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
%bcond_without released
Name: selenium-webdriver-at-spi
Version: 22.12.0
Release: 0
Summary: Selenium/Appium WebDriver implementation based on AT-SPI Accessibility
License: GPL-2.0-only OR GPL-3.0-only
URL: https://invent.kde.org/sdk/selenium-webdriver-at-spi
Source: %{name}-%{version}.tar.xz
BuildRequires: cmake >= 3.22
BuildRequires: kf6-extra-cmake-modules >= %{kf6_version}
BuildRequires: pkgconfig
BuildRequires: qt6-gui-private-devel >= %{qt6_version}
BuildRequires: update-desktop-files
BuildRequires: cmake(KF6CoreAddons) >= %{kf6_version}
BuildRequires: cmake(KF6WindowSystem) >= %{kf6_version}
BuildRequires: cmake(KPipeWire) >= %{_plasma6_bugfix}
BuildRequires: cmake(KWayland) >= %{_plasma6_bugfix}
BuildRequires: cmake(PlasmaWaylandProtocols)
BuildRequires: cmake(Qt6Core) >= %{qt6_version}
BuildRequires: cmake(Qt6DBus) >= %{qt6_version}
BuildRequires: cmake(Qt6WaylandClient) >= %{qt6_version}
BuildRequires: pkgconfig(wayland-client)
Requires: %{_bindir}/dbus-send
Requires: gobject-introspection
# https://invent.kde.org/sdk/selenium-webdriver-at-spi/-/blob/master/requirements.txt
# Appium is only needed for unit tests
Requires: python3-atspi
Requires: python3-Flask >= 2.2.2
Requires: python3-gobject >= 3.42.0
Requires: python3-lxml >= 4.9.3
Requires: python3-selenium >= 4.5.0
%description
Selenium/Appium WebDriver implementation based on AT-SPI Accessibility
%package devel
Summary: Development files for the Selenium/Appium WebDriver
Requires: selenium-webdriver-at-spi = %{version}
%description devel
Development files for the Selenium/Appium WebDriver package
%prep
%autosetup -p1
# E: env-script-interpreter
sed -i 's#env ruby$#ruby#' run.rb
%build
%cmake_kf6 -DBUILD_WITH_QT6:BOOL=TRUE
%kf6_build
%install
%kf6_install
# selenium-webdriver-at-spi-run would run pip3 if requirements.txt is present
rm %{buildroot}%{_kf6_sharedir}/selenium-webdriver-at-spi/requirements.txt
%suse_update_desktop_file -r org.kde.selenium-webdriver-at-spi-appidlister Development Accessibility
%suse_update_desktop_file -r org.kde.selenium-webdriver-at-spi-screenshotter Development Accessibility
%suse_update_desktop_file -r org.kde.selenium-webdriver-at-spi-inputsynth Development Accessibility
%suse_update_desktop_file -r org.kde.selenium-webdriver-at-spi-recorder Development Accessibility
%files
%license LICENSES/*
%doc README.md
%{_kf6_applicationsdir}/org.kde.selenium-webdriver-at-spi-appidlister.desktop
%{_kf6_applicationsdir}/org.kde.selenium-webdriver-at-spi-inputsynth.desktop
%{_kf6_applicationsdir}/org.kde.selenium-webdriver-at-spi-recorder.desktop
%{_kf6_applicationsdir}/org.kde.selenium-webdriver-at-spi-screenshotter.desktop
%{_kf6_bindir}/selenium-webdriver-at-spi-appidlister
%{_kf6_bindir}/selenium-webdriver-at-spi-inputsynth
%{_kf6_bindir}/selenium-webdriver-at-spi-recorder
%{_kf6_bindir}/selenium-webdriver-at-spi-run
%{_kf6_bindir}/selenium-webdriver-at-spi-screenshotter
%dir %{_kf6_sharedir}/selenium-webdriver-at-spi
%{_kf6_sharedir}/selenium-webdriver-at-spi/app_roles.py
%{_kf6_sharedir}/selenium-webdriver-at-spi/selenium-webdriver-at-spi.py
%files devel
%{_kf6_cmakedir}/SeleniumWebDriverATSPI/
%changelog