-%define kdeframever 5.67
-%define qtver 5.9.0
+#
+# Conditional build:
+%bcond_with tests # build with tests
+%define kdeframever 5.100
+%define qtver 5.15.2
%define kfname purpose
-Summary: purpose
+Summary: Offers available actions for a specific purpose
Name: kf5-%{kfname}
-Version: 5.67.0
-Release: 2
+Version: 5.100.0
+Release: 1
License: LGPL v2.1+
Group: X11/Libraries
-Source0: http://download.kde.org/stable/frameworks/%{kdeframever}/%{kfname}-%{version}.tar.xz
-# Source0-md5: 4039367834bc9039a84261b5a8d9912c
-Patch0: %{name}-main_js.patch
+Source0: https://download.kde.org/stable/frameworks/%{kdeframever}/%{kfname}-%{version}.tar.xz
+# Source0-md5: d1db24150fe24f8294d91e0a7dde7eef
URL: http://www.kde.org/
BuildRequires: Qt5Core-devel >= %{qtver}
BuildRequires: Qt5Test-devel >= %{qtver}
-
BuildRequires: cmake >= 2.8.12
BuildRequires: gettext-devel
BuildRequires: ka5-kaccounts-integration-devel
BuildRequires: kf5-kconfig-devel >= %{version}
BuildRequires: kf5-kcoreaddons-devel >= %{version}
BuildRequires: kf5-ki18n-devel >= %{version}
+BuildRequires: kf5-kio-devel >= %{version}
BuildRequires: kf5-kirigami2-devel >= %{version}
+BuildRequires: libaccounts-glib-devel
BuildRequires: libaccounts-qt5-devel
BuildRequires: libsignon-qt5-devel >= 8.55
BuildRequires: libutempter-devel
%define qt5dir %{_libdir}/qt5
%description
-purpose.
+This framework offers the possibility to create integrate services and
+actions on any application without having to implement them
+specifically. Purpose will offer them mechanisms to list the different
+alternatives to execute given the requested action type and will
+facilitate components so that all the plugins can receive all the
+information they need.
+
+%package twitter
+Summary: Twitter plugin for purpose
+Group: X11/Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description twitter
+Twitter plugin for purpose.
%package devel
Summary: Header files for %{kfname} development
%prep
%setup -q -n %{kfname}-%{version}
-%patch0 -p0
%build
install -d build
cd build
%cmake -G Ninja \
+ %{!?with_tests:-DBUILD_TESTING=OFF} \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
../
%ninja_build
+%if %{with tests}
+ctest
+%endif
+
+
%install
rm -rf $RPM_BUILD_ROOT
%ninja_install -C build
%files -f %{kfname}5.lang
%defattr(644,root,root,755)
-%attr(755,root,root) %ghost %{_libdir}/libKF5Purpose.so.5
+%ghost %{_libdir}/libKF5Purpose.so.5
%attr(755,root,root) %{_libdir}/libKF5Purpose.so.5.*.*
-%attr(755,root,root) %ghost %{_libdir}/libKF5PurposeWidgets.so.5
+%ghost %{_libdir}/libKF5PurposeWidgets.so.5
%attr(755,root,root) %{_libdir}/libKF5PurposeWidgets.so.5.*.*
-%attr(755,root,root) %ghost %{_libdir}/libPhabricatorHelpers.so.5
+%ghost %{_libdir}/libPhabricatorHelpers.so.5
%attr(755,root,root) %{_libdir}/libPhabricatorHelpers.so.5.*.*
-%attr(755,root,root) %ghost %{_libdir}/libReviewboardHelpers.so.5
+%ghost %{_libdir}/libReviewboardHelpers.so.5
%attr(755,root,root) %{_libdir}/libReviewboardHelpers.so.5.*.*
%dir %{_libdir}/qt5/plugins/kf5/kfileitemaction
%attr(755,root,root) %{_libdir}/qt5/plugins/kf5/kfileitemaction/sharefileitemaction.so
%dir %{_libdir}/qt5/plugins/kf5/purpose
+%attr(755,root,root) %{_libdir}/qt5/plugins/kf5/purpose/barcodeplugin.so
%attr(755,root,root) %{_libdir}/qt5/plugins/kf5/purpose/bluetoothplugin.so
%attr(755,root,root) %{_libdir}/qt5/plugins/kf5/purpose/emailplugin.so
%attr(755,root,root) %{_libdir}/qt5/plugins/kf5/purpose/imgurplugin.so
%dir %{_libdir}/qt5/qml/org/kde/purpose/phabricator
%attr(755,root,root) %{_libdir}/qt5/qml/org/kde/purpose/phabricator/libphabricatorquickplugin.so
%{_libdir}/qt5/qml/org/kde/purpose/phabricator/qmldir
-%{_libdir}/qt5/qml/org/kde/purpose/plugins.qmltypes
%{_libdir}/qt5/qml/org/kde/purpose/qmldir
%dir %{_libdir}/qt5/qml/org/kde/purpose/reviewboard
%attr(755,root,root) %{_libdir}/qt5/qml/org/kde/purpose/reviewboard/librbpurposequickplugin.so
%dir %{_datadir}/accounts/services/kde
%{_datadir}/accounts/services/kde/google-youtube.service
%{_datadir}/accounts/services/kde/nextcloud-upload.service
-%{_datadir}/accounts/services/kde/twitter-microblog.service
%{_datadir}/qlogging-categories5/purpose.categories
%{_iconsdir}/hicolor/128x128/apps/phabricator-purpose.png
%{_iconsdir}/hicolor/128x128/apps/reviewboard-purpose.png
%{_iconsdir}/hicolor/32x32/actions/kipiplugin_youtube.png
%{_iconsdir}/hicolor/48x48/actions/kipiplugin_youtube.png
%{_iconsdir}/hicolor/64x64/actions/kipiplugin_youtube.png
-%dir %{_datadir}/kpackage/Purpose
-%dir %{_datadir}/kpackage/Purpose/Twitter
-%dir %{_datadir}/kpackage/Purpose/Twitter/contents
-%dir %{_datadir}/kpackage/Purpose/Twitter/contents/code
-%{_datadir}/kpackage/Purpose/Twitter/contents/code/main.js
-%{_datadir}/kpackage/Purpose/Twitter/contents/code/package.json
-%dir %{_datadir}/kpackage/Purpose/Twitter/contents/config
-%{_datadir}/kpackage/Purpose/Twitter/contents/config/config.qml
-%{_datadir}/kpackage/Purpose/Twitter/metadata.json
-%dir %{_datadir}/purpose
-%{_datadir}/purpose/bluetoothplugin_config.qml
-%{_datadir}/purpose/kdeconnectplugin_config.qml
-%{_datadir}/purpose/nextcloudplugin_config.qml
-%{_datadir}/purpose/phabricatorplugin_config.qml
-%{_datadir}/purpose/reviewboardplugin_config.qml
-%{_datadir}/purpose/saveasplugin_config.qml
-%{_datadir}/purpose/youtubeplugin_config.qml
+%{_datadir}/purpose
+%{_datadir}/qlogging-categories5/purpose.renamecategories
+%attr(755,root,root) %{_libdir}/qt5/plugins/kf5/purpose/twitterplugin.so
+%{_libdir}/qt5/qml/org/kde/purpose/AlternativesView.qml
+%{_libdir}/qt5/qml/org/kde/purpose/JobView.qml
%files devel
%defattr(644,root,root,755)
%{_includedir}/KF5/purposewidgets
%{_libdir}/cmake/KDEExperimentalPurpose
%{_libdir}/cmake/KF5Purpose
-%attr(755,root,root) %{_libdir}/libKF5Purpose.so
-%attr(755,root,root) %{_libdir}/libKF5PurposeWidgets.so
+%{_libdir}/libKF5Purpose.so
+%{_libdir}/libKF5PurposeWidgets.so