diff --git a/src/kde/kioslave/kio_recoll/00README.txt b/src/kde/kioslave/kio_recoll/00README.txt index 34bb9f5c..a314808e 100644 --- a/src/kde/kioslave/kio_recoll/00README.txt +++ b/src/kde/kioslave/kio_recoll/00README.txt @@ -49,7 +49,8 @@ Recipe: mkdir builddir cd builddir -cmake .. -DCMAKE_INSTALL_PREFIX=/usr +cmake -DCMAKE_INSTALL_PREFIX=/usr .. + make sudo make install diff --git a/src/kde/kioslave/kio_recoll/CMakeLists.txt b/src/kde/kioslave/kio_recoll/CMakeLists.txt index 14f426fe..43557f00 100644 --- a/src/kde/kioslave/kio_recoll/CMakeLists.txt +++ b/src/kde/kioslave/kio_recoll/CMakeLists.txt @@ -91,15 +91,12 @@ z pthread ) -install(FILES recoll.protocol recollf.protocol - DESTINATION ${SERVICES_INSTALL_DIR}) -install(FILES data/welcome.html data/help.html - DESTINATION ${DATA_INSTALL_DIR}/kio_recoll) +#install(FILES recoll.protocol recollf.protocol +# DESTINATION ${SERVICES_INSTALL_DIR}) -# Tried but could not use PLUGIN_INSTALL_DIR (/usr/lib64/plugins), or -# /usr/lib64/qt5/plugins/kf5/kio/recoll.so: the module is not found by -# dolphin). Actually that's because of the protocol file. recoll has -# exec=kio_recoll, file has exec=kf5/kio/file +install(FILES data/welcome.html data/help.html + DESTINATION ${DATA_INSTALL_DIR}/kio_recoll) set_target_properties(kio_recoll PROPERTIES OUTPUT_NAME "kio_recoll") -install(TARGETS kio_recoll DESTINATION ${LIB_INSTALL_DIR}/qt5/plugins) +install(TARGETS kio_recoll + DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf${QT_MAJOR_VERSION}/kio) diff --git a/src/kde/kioslave/kio_recoll/kio_recoll.cpp b/src/kde/kioslave/kio_recoll/kio_recoll.cpp index abf6c8f5..d83f99f3 100644 --- a/src/kde/kioslave/kio_recoll/kio_recoll.cpp +++ b/src/kde/kioslave/kio_recoll/kio_recoll.cpp @@ -45,6 +45,12 @@ using namespace KIO; using namespace std; +class KIOPluginForMetaData : public QObject +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.recoll.kio.slave.recoll" FILE "recoll.json") +}; + RclConfig *RecollProtocol::o_rclconfig; RecollProtocol::RecollProtocol(const QByteArray& pool, const QByteArray& app) @@ -356,19 +362,25 @@ bool RecollProtocol::doSearch(const QueryDesc& qd) return true; } -int kdemain(int argc, char **argv) +extern "C" { - QCoreApplication::setApplicationName("kio_recoll"); - qDebug() << "*** starting kio_recoll "; + Q_DECL_EXPORT int kdemain(int argc, char **argv) + { + QCoreApplication app(argc, argv); + app.setApplicationName("kio_recoll"); + qDebug() << "*** starting kio_recoll "; - if (argc != 4) { - qDebug() << "Usage: kio_recoll proto dom-socket1 dom-socket2\n"; - exit(-1); + if (argc != 4) { + qDebug() << "Usage: kio_recoll proto dom-socket1 dom-socket2\n"; + exit(-1); + } + + RecollProtocol slave(argv[2], argv[3]); + slave.dispatchLoop(); + + qDebug() << "kio_recoll Done"; + return 0; } - - RecollProtocol slave(argv[2], argv[3]); - slave.dispatchLoop(); - - qDebug() << "kio_recoll Done"; - return 0; } +#include "kio_recoll.moc" + diff --git a/src/kde/kioslave/kio_recoll/kio_recoll.la b/src/kde/kioslave/kio_recoll/kio_recoll.la deleted file mode 100755 index 9fcc2454..00000000 --- a/src/kde/kioslave/kio_recoll/kio_recoll.la +++ /dev/null @@ -1,35 +0,0 @@ -# kio_recoll.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5a (1.1240 2003/06/26 06:55:19) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='kio_recoll.so' - -# Names of this library. -library_names='kio_recoll.so kio_recoll.so kio_recoll.so' - -# The name of the static archive. -old_library='' - -# Libraries that this one depends upon. -dependency_libs=' -R/usr/local/lib -R/usr/X11R6/lib -L/usr/X11R6/lib -L/usr/local/lib /usr/local/lib/libkio.la /usr/local/lib/libkdeui.la /usr/local/lib/libkdesu.la /usr/local/lib/libkwalletclient.la /usr/local/lib/libkdecore.la /usr/local/lib/libDCOP.la -lutil -lart_lgpl_2 -lidn /usr/local/lib/libkdefx.la -lqt-mt -lpng -lXext -lX11 -lSM -lICE -lXrender -lz /usr/local/lib/libfam.la -ljpeg' - -# Version information for kio_recoll. -current=0 -age=0 -revision=0 - -# Is this an already installed library? -installed=yes - -# Should we warn recoll portability when linking against -modules? -shouldnotlink=yes - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/usr/lib/kde3' diff --git a/src/kde/kioslave/kio_recoll/recoll.json b/src/kde/kioslave/kio_recoll/recoll.json new file mode 100644 index 00000000..7c674248 --- /dev/null +++ b/src/kde/kioslave/kio_recoll/recoll.json @@ -0,0 +1,24 @@ +{ + "KDE-KIO-Protocols": { + "recoll": { + "Class": ":local", + "Icon": "recoll", + "deleting": true, + "input": "none", + "linking": false, + "listing": [ + "Name", + "Type", + "Size", + "Date" + ], + "makedir":false, + "moving": false, + "output": "filesystem", + "protocol": "recoll", + "reading": true, + "source": false, + "writing": false + } + } +} diff --git a/src/kde/kioslave/kio_recoll/recollf.protocol b/src/kde/kioslave/kio_recoll/recollf.protocol index fb150ecf..dd12d4be 100644 --- a/src/kde/kioslave/kio_recoll/recollf.protocol +++ b/src/kde/kioslave/kio_recoll/recollf.protocol @@ -1,5 +1,5 @@ [Protocol] -exec=kio_recoll +exec=kf5/kio/kio_recoll protocol=recollf input=none output=filesystem