-%define kdeplasmaver 5.23.1
-%define qtver 5.9.0
+#
+# Conditional build:
+%bcond_with tests # build with tests
+%define kdeplasmaver 5.27.0
+%define qtver 5.15.2
%define kpname bluedevil
Summary: Integrate the Bluetooth technology within KDE workspace and applications
Name: kp5-%{kpname}
-Version: 5.23.1
-Release: 1
+Version: 5.27.0
+Release: 2
License: GPL v2+/LGPL v2.1+
Group: X11/Libraries
-Source0: http://download.kde.org/stable/plasma/%{kdeplasmaver}/%{kpname}-%{version}.tar.xz
-# Source0-md5: b4f0954c9b79fbb5c9ff80df501128f0
+Source0: https://download.kde.org/stable/plasma/%{kdeplasmaver}/%{kpname}-%{version}.tar.xz
+# Source0-md5: 08b2b37d8abfd3fefa84644e6966f269
URL: http://www.kde.org/
BuildRequires: Qt5Core-devel >= %{qtver}
+BuildRequires: Qt5Quick-devel >= %{qtver}
+BuildRequires: Qt5Widgets-devel >= %{qtver}
BuildRequires: cmake >= 2.8.12
BuildRequires: kf5-bluez-qt-devel
BuildRequires: kf5-extra-cmake-modules >= 1.4.0
+BuildRequires: kf5-kcmutils-devel
+BuildRequires: kf5-kconfigwidgets-devel
+BuildRequires: kf5-kdbusaddons-devel
+BuildRequires: kf5-kdeclarative-devel
BuildRequires: kf5-kded-devel
+BuildRequires: kf5-ki18n-devel
+BuildRequires: kf5-kio-devel
+BuildRequires: kf5-kirigami2-devel
+BuildRequires: kf5-knotifications-devel
+BuildRequires: kf5-kwidgetsaddons-devel
+BuildRequires: kf5-kwindowsystem-devel
+BuildRequires: kf5-plasma-framework-devel
BuildRequires: ninja
BuildRequires: qt5-build >= %{qtver}
BuildRequires: rpmbuild(macros) >= 1.164
install -d build
cd build
%cmake -G Ninja \
+ %{!?with_tests:-DBUILD_TESTING=OFF} \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DHTML_INSTALL_DIR=%{_kdedocdir} \
..
%ninja_build
+%if %{with tests}
+ctest
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
%ninja_install -C build
+# not supported by glibc yet
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ie
+
%find_lang bluedevil --all-name --with-kde
%clean
%{_datadir}/plasma/plasmoids/org.kde.plasma.bluetooth
%{_datadir}/remoteview/bluetooth-network.desktop
%{_datadir}/metainfo/org.kde.plasma.bluetooth.appdata.xml
-%{_libdir}/qt5/plugins/kcms/kcm_bluetooth.so
%dir %{_datadir}/kpackage/kcms/kcm_bluetooth
%dir %{_datadir}/kpackage/kcms/kcm_bluetooth/contents
%dir %{_datadir}/kpackage/kcms/kcm_bluetooth/contents/ui
-%{_datadir}/kpackage/kcms/kcm_bluetooth/contents/ui/Bluetooth.qml
%{_datadir}/kpackage/kcms/kcm_bluetooth/contents/ui/Device.qml
%{_datadir}/kpackage/kcms/kcm_bluetooth/contents/ui/General.qml
-%{_datadir}/kpackage/kcms/kcm_bluetooth/metadata.desktop
-%{_datadir}/kpackage/kcms/kcm_bluetooth/metadata.json
-%{_datadir}/kservices5/bluetooth.desktop
+%{_datadir}/kservices5/plasma-applet-org.kde.plasma.bluetooth.desktop
+%{_libdir}/qt5/plugins/plasma/kcms/systemsettings/kcm_bluetooth.so
+%{_desktopdir}/kcm_bluetooth.desktop
+%{_datadir}/kpackage/kcms/kcm_bluetooth/contents/ui/main.qml
+%{_datadir}/qlogging-categories5/bluedevil.categories