From afe162eb626194596f2e9744ee3c75b3e136ace7 Mon Sep 17 00:00:00 2001 From: zhangpengfei Date: Wed, 6 Jan 2021 08:57:21 +0800 Subject: [PATCH] Add debian related files. --- debian/changelog | 5 ++ debian/compat | 1 + debian/control | 57 +++++++++++++++++++ debian/libchinese-segmentation0.install | 2 + debian/libukui-search-dev.install | 2 + debian/libukui-search0.install | 1 + debian/rules | 25 ++++++++ debian/source/format | 1 + debian/ukui-search.install | 1 + .../libchinese-segmentation.pro | 2 +- libsearch/libsearch.pro | 8 ++- src/main.cpp | 28 ++++----- src/mainwindow.cpp | 2 +- src/src.pro | 2 +- 14 files changed, 118 insertions(+), 19 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/libchinese-segmentation0.install create mode 100644 debian/libukui-search-dev.install create mode 100644 debian/libukui-search0.install create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/ukui-search.install diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..86a706a --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +ukui-search (0.0.1+0104) v101; urgency=medium + + * Initial release. + + -- zhangpengfei Mon, 04 Jan 2021 20:37:23 +0800 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..4ddb581 --- /dev/null +++ b/debian/control @@ -0,0 +1,57 @@ +Source: ukui-search +Section: utils +Priority: optional +Maintainer: zhangpengfei +Build-Depends: debhelper (>=9.0.0), + pkgconf, + libgsettings-qt-dev, + qtbase5-dev, + qt5-qmake, + qtchooser, + qtscript5-dev, + qttools5-dev-tools, + libxapian-dev, + libquazip5-dev, + libglib2.0-dev, + libgsettings-qt-dev +Standards-Version: 4.5.0 +Homepage: https://www.ukui.org/ +Vcs-Git: https://github.com/ukui/ukui-search.git +Vcs-Browser: https://github.com/ukui/ukui-search + +Package: ukui-search +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libukui-search0 (= ${binary:Version}) +Description: ukui-search is a user-wide desktop search + feature of UKUI desktop environment. + +Package: libchinese-segmentation0 +Section: libs +Architecture: any +Depends: ${misc:Depends}, + ${shlibs:Depends} +Provides: libchinese-segmentation, +Description: Libraries for chinese-segmentation + . + This package contains a few runtime libraries needed by + libsearch. + +Package: libukui-search0 +Section: libs +Architecture: any +Depends: ${misc:Depends}, + ${shlibs:Depends}, + libchinese-segmentation0 (= ${binary:Version}) +Provides: libukui-search, +Description: Libraries for ukui-search. + +Package: libukui-search-dev +Section: libdevel +Architecture: any +Depends: ${misc:Depends}, + ${shlibs:Depends}, + libukui-search0 (= ${binary:Version}), + libchinese-segmentation0 (= ${binary:Version}) +Description: Libraries for ukui-search(development files). \ No newline at end of file diff --git a/debian/libchinese-segmentation0.install b/debian/libchinese-segmentation0.install new file mode 100644 index 0000000..0299c40 --- /dev/null +++ b/debian/libchinese-segmentation0.install @@ -0,0 +1,2 @@ +usr/lib/*.so.* +/usr/share/ukui-search/res/dict/*.utf8 diff --git a/debian/libukui-search-dev.install b/debian/libukui-search-dev.install new file mode 100644 index 0000000..b814d89 --- /dev/null +++ b/debian/libukui-search-dev.install @@ -0,0 +1,2 @@ +usr/include/ukui-search/* +usr/lib/*/*.so \ No newline at end of file diff --git a/debian/libukui-search0.install b/debian/libukui-search0.install new file mode 100644 index 0000000..3de3b10 --- /dev/null +++ b/debian/libukui-search0.install @@ -0,0 +1 @@ +usr/lib/*/*.so.* diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..951ea1c --- /dev/null +++ b/debian/rules @@ -0,0 +1,25 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +# export QT_SELECT=5 + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +%: + dh $@ + + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/debian/ukui-search.install b/debian/ukui-search.install new file mode 100644 index 0000000..1df36c6 --- /dev/null +++ b/debian/ukui-search.install @@ -0,0 +1 @@ +usr/bin/* diff --git a/libchinese-segmentation/libchinese-segmentation.pro b/libchinese-segmentation/libchinese-segmentation.pro index 5fbe1df..8823ae7 100644 --- a/libchinese-segmentation/libchinese-segmentation.pro +++ b/libchinese-segmentation/libchinese-segmentation.pro @@ -1,6 +1,6 @@ QT -= gui -#VERSION = 0.0.1 +VERSION = 0.0.1 TARGET = chinese-segmentation TEMPLATE = lib DEFINES += LIBCHINESESEGMENTATION_LIBRARY diff --git a/libsearch/libsearch.pro b/libsearch/libsearch.pro index d73e673..1e32a06 100644 --- a/libsearch/libsearch.pro +++ b/libsearch/libsearch.pro @@ -48,9 +48,13 @@ RESOURCES += \ # Default rules for deployment. unix { - target.path = /usr/lib + target.path = $$[QT_INSTALL_LIBS] + INSTALLS += target + + header.path = /usr/include/ukui-search + header.files += libsearch.h + INSTALLS += header } -!isEmpty(target.path): INSTALLS += target diff --git a/src/main.cpp b/src/main.cpp index 3d283e1..0b1b6e0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -50,23 +50,23 @@ int main(int argc, char *argv[]) //load chinese character and pinyin file to a Map FileUtils::loadHanziTable("://index/pinyinWithoutTone.txt"); /*-------------InotyifyRefact Test Start---------------*/ -// QTime t1 = QTime::currentTime(); -// InotifyManagerRefact* imr = new InotifyManagerRefact("/home"); -// imr->start(); -// QTime t2 = QTime::currentTime(); -// qDebug() << t1; -// qDebug() << t2; + QTime t1 = QTime::currentTime(); + InotifyManagerRefact* imr = new InotifyManagerRefact("/home"); + imr->start(); + QTime t2 = QTime::currentTime(); + qDebug() << t1; + qDebug() << t2; /*-------------InotyifyRefact Test End-----------------*/ /*-------------InotyifyRefact Test Start---------------*/ -// QTime t1 = QTime::currentTime(); -// FileTypeFilter* ftf = new FileTypeFilter("/home"); -// ftf->Test(); -// QTime t2 = QTime::currentTime(); -// delete ftf; -// ftf = nullptr; -// qDebug() << t1; -// qDebug() << t2; + QTime t3 = QTime::currentTime(); + FileTypeFilter* ftf = new FileTypeFilter("/home"); + ftf->Test(); + QTime t4 = QTime::currentTime(); + delete ftf; + ftf = nullptr; + qDebug() << t3; + qDebug() << t4; /*-------------InotyifyRefact Test End-----------------*/ /*-------------文本搜索 Test start-----------------*/ diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0deedf2..ebda995 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -351,7 +351,7 @@ bool MainWindow::nativeEvent(const QByteArray &eventType, void *message, long *r switch (event->response_type & ~0x80) { case XCB_FOCUS_OUT: - this->close(); + this->hide(); break; } diff --git a/src/src.pro b/src/src.pro index e783da2..fd0bb72 100644 --- a/src/src.pro +++ b/src/src.pro @@ -57,7 +57,7 @@ qm_files.files = $$OUT_PWD/res/translations/*.qm INSTALLS += \ qm_files \ -unix:!macx: LIBS += -L$$OUT_PWD/../libsearch -lukui-search -L../libchinese-segmentation/ -lchinese-segmentation +LIBS += -L$$PWD/../libsearch -lukui-search -L$$PWD/../libchinese-segmentation/ -lchinese-segmentation INCLUDEPATH += $$PWD/../libsearch DEPENDPATH += $$PWD/../libsearch