deb packaging: fix for jessie
This commit is contained in:
parent
91cc912808
commit
f15d6564c6
114
packaging/debian/debian/control-jessie
Normal file
114
packaging/debian/debian/control-jessie
Normal file
@ -0,0 +1,114 @@
|
||||
Source: recoll
|
||||
Section: x11
|
||||
Priority: optional
|
||||
Maintainer: Jean-Francois Dockes <jfd@recoll.org>
|
||||
Build-Depends: bison,
|
||||
debhelper (>= 9),
|
||||
dh-python,
|
||||
dpkg-dev (>= 1.16.1~),
|
||||
libaspell-dev,
|
||||
libchm-dev,
|
||||
libqt5webkit5-dev,
|
||||
libx11-dev,
|
||||
libxapian-dev (>= 1.2.0),
|
||||
libxslt1-dev,
|
||||
libz-dev,
|
||||
pkg-config,
|
||||
python-all-dev (>= 2.6.6-3~),
|
||||
python-setuptools,
|
||||
python3-all-dev,
|
||||
python3-setuptools,
|
||||
qtbase5-dev
|
||||
X-Python3-Version: >= 3.4
|
||||
Vcs-Git: https://salsa.debian.org/debian/recoll.git
|
||||
Vcs-Browser: https://salsa.debian.org/debian/recoll
|
||||
Homepage: https://www.lesbonscomptes.com/recoll
|
||||
Standards-Version: 4.2.1
|
||||
|
||||
Package: recoll
|
||||
Architecture: all
|
||||
Depends: recollcmd, recollgui, ${misc:Depends}
|
||||
Description: Personal full text search package
|
||||
This package is a personal full text search package is based on a very strong
|
||||
backend (Xapian), for which it provides an easy to use and feature-rich
|
||||
interface.
|
||||
.
|
||||
Features:
|
||||
* Qt-based GUI.
|
||||
* Supports the following document types (and their compressed versions)
|
||||
- Natively: text, html, OpenOffice files, excel, ppt, maildir and
|
||||
mailbox (Mozilla and IceDove mail) with attachments, pidgin log files
|
||||
- With external helpers: pdf (pdftotext), postscript (ghostscript), msword
|
||||
(antiword), rtf (unrtf). And others...
|
||||
* Powerful query facilities, with boolean searches, phrases, filter on file
|
||||
types and directory tree.
|
||||
* Support for multiple charsets, Internal processing and storage uses Unicode
|
||||
UTF-8.
|
||||
* Stemming performed at query time (can switch stemming language after
|
||||
indexing).
|
||||
* Easy installation. No database daemon, web server or exotic language
|
||||
necessary.
|
||||
* The indexer can run either continuously or in batch.
|
||||
|
||||
Package: recollcmd
|
||||
Architecture: any
|
||||
Breaks: recoll (<< 1.23.7-2)
|
||||
Replaces: recoll (<< 1.23.7-2)
|
||||
Depends: python3, ${misc:Depends}, ${shlibs:Depends}
|
||||
Recommends: antiword,
|
||||
aspell,
|
||||
groff,
|
||||
libimage-exiftool-perl,
|
||||
poppler-utils,
|
||||
python3-lxml,
|
||||
python3-recoll,
|
||||
python3-six,
|
||||
python3-mutagen,
|
||||
python3-rarfile,
|
||||
unrtf,
|
||||
unzip,
|
||||
xdg-utils
|
||||
Suggests: ghostscript,
|
||||
libinotifytools0,
|
||||
untex,
|
||||
wv
|
||||
Description: Command line programs for recoll
|
||||
This package supports indexing and command line querying.
|
||||
|
||||
Package: recollgui
|
||||
Architecture: any
|
||||
Breaks: recoll (<< 1.23.7-2)
|
||||
Replaces: recoll (<< 1.23.7-2)
|
||||
Depends: recollcmd (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: GUI program and elements for recoll
|
||||
Main recoll GUI for configuring, controlling and querying recoll indexes.
|
||||
|
||||
Package: python-recoll
|
||||
Architecture: any
|
||||
Section: python
|
||||
Depends: python,
|
||||
recollcmd (= ${binary:Version}),
|
||||
${misc:Depends},
|
||||
${python:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Python extension for recoll
|
||||
Personal full text search package which is based on a very strong backend
|
||||
(Xapian), for which it provides an easy to use and feature-rich interface.
|
||||
.
|
||||
This package provides Python extension module for recoll which can be use to
|
||||
extend recoll such as an Ubuntu Unity Lens.
|
||||
|
||||
Package: python3-recoll
|
||||
Architecture: any
|
||||
Section: python
|
||||
Depends: python3,
|
||||
recollcmd (= ${binary:Version}),
|
||||
${misc:Depends},
|
||||
${python3:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Python extension for recoll (Python3)
|
||||
Personal full text search package which is based on a very strong backend
|
||||
(Xapian), for which it provides an easy to use and feature-rich interface.
|
||||
.
|
||||
This package provides Python3 extension module for recoll which can be use to
|
||||
extend recoll such as an Ubuntu Unity Lens.
|
||||
@ -0,0 +1,101 @@
|
||||
diff --git a/internfile/mh_mbox.cpp b/srcinternfile/mh_mbox.cpp
|
||||
index 2a0918cf..92ad7e23 100644
|
||||
--- a/internfile/mh_mbox.cpp
|
||||
+++ b/internfile/mh_mbox.cpp
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <fstream>
|
||||
+#include <memory>
|
||||
|
||||
#include "cstr.h"
|
||||
#include "mimehandler.h"
|
||||
@@ -285,7 +286,7 @@ public:
|
||||
Internal(MimeHandlerMbox *p) : pthis(p) {}
|
||||
std::string fn; // File name
|
||||
std::string ipath;
|
||||
- ifstream instream;
|
||||
+ std::unique_ptr<ifstream> instream;
|
||||
int msgnum{0}; // Current message number in folder. Starts at 1
|
||||
int64_t lineno{0}; // debug
|
||||
int64_t fsize{0};
|
||||
@@ -321,7 +322,6 @@ void MimeHandlerMbox::clear_impl()
|
||||
{
|
||||
m->fn.erase();
|
||||
m->ipath.erase();
|
||||
- m->instream = ifstream();
|
||||
m->msgnum = 0;
|
||||
m->lineno = 0;
|
||||
m->fsize = 0;
|
||||
@@ -339,8 +339,9 @@ bool MimeHandlerMbox::set_document_file_impl(const string&, const string &fn)
|
||||
LOGDEB("MimeHandlerMbox::set_document_file(" << fn << ")\n");
|
||||
clear_impl();
|
||||
m->fn = fn;
|
||||
- m->instream = ifstream(fn.c_str(), std::ifstream::binary);
|
||||
- if (!m->instream.good()) {
|
||||
+ m->instream = std::unique_ptr<ifstream>(
|
||||
+ new ifstream(fn.c_str(), std::ifstream::binary));
|
||||
+ if (!m->instream->good()) {
|
||||
LOGSYSERR("MimeHandlerMail::set_document_file", "ifstream", fn);
|
||||
return false;
|
||||
}
|
||||
@@ -389,13 +390,13 @@ bool MimeHandlerMbox::Internal::tryUseCache(int mtarg)
|
||||
fsize)) < 0) {
|
||||
goto out;
|
||||
}
|
||||
- instream.seekg(off);
|
||||
- if (!instream.good()) {
|
||||
+ instream->seekg(off);
|
||||
+ if (!instream->good()) {
|
||||
LOGSYSERR("tryUseCache", "seekg", "");
|
||||
goto out;
|
||||
}
|
||||
- getline(instream, line, '\n');
|
||||
- if (!instream.good()) {
|
||||
+ getline(*instream, line, '\n');
|
||||
+ if (!instream->good()) {
|
||||
LOGSYSERR("tryUseCache", "getline", "");
|
||||
goto out;
|
||||
}
|
||||
@@ -404,7 +405,7 @@ bool MimeHandlerMbox::Internal::tryUseCache(int mtarg)
|
||||
if ((fromregex(line) ||
|
||||
((quirks & MBOXQUIRK_TBIRD) && minifromregex(line))) ) {
|
||||
LOGDEB0("MimeHandlerMbox: Cache: From_ Ok\n");
|
||||
- instream.seekg(off);
|
||||
+ instream->seekg(off);
|
||||
msgnum = mtarg -1;
|
||||
cachefound = true;
|
||||
} else {
|
||||
@@ -414,7 +415,7 @@ bool MimeHandlerMbox::Internal::tryUseCache(int mtarg)
|
||||
out:
|
||||
if (!cachefound) {
|
||||
// No cached result: scan.
|
||||
- instream.seekg(0);
|
||||
+ instream->seekg(0);
|
||||
msgnum = 0;
|
||||
}
|
||||
return cachefound;
|
||||
@@ -422,7 +423,7 @@ out:
|
||||
|
||||
bool MimeHandlerMbox::next_document()
|
||||
{
|
||||
- if (!m->instream.good()) {
|
||||
+ if (!m->instream->good()) {
|
||||
LOGERR("MimeHandlerMbox::next_document: not open\n");
|
||||
return false;
|
||||
}
|
||||
@@ -458,10 +459,10 @@ bool MimeHandlerMbox::next_document()
|
||||
msgtxt.erase();
|
||||
string line;
|
||||
for (;;) {
|
||||
- message_end = m->instream.tellg();
|
||||
- getline(m->instream, line, '\n');
|
||||
- if (!m->instream.good()) {
|
||||
- ifstream::iostate st = m->instream.rdstate();
|
||||
+ message_end = m->instream->tellg();
|
||||
+ getline(*m->instream, line, '\n');
|
||||
+ if (!m->instream->good()) {
|
||||
+ ifstream::iostate st = m->instream->rdstate();
|
||||
if (st & std::ifstream::eofbit) {
|
||||
LOGDEB0("MimeHandlerMbox:next: eof at " << message_end << endl);
|
||||
} else {
|
||||
1
packaging/debian/debian/patches/series-jessie
Normal file
1
packaging/debian/debian/patches/series-jessie
Normal file
@ -0,0 +1 @@
|
||||
mbox-use-streamptr-for-jessie.diff
|
||||
59
packaging/debian/debian/rules-jessie
Executable file
59
packaging/debian/debian/rules-jessie
Executable file
@ -0,0 +1,59 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
# Setting the following on jessie results in a -fpie flag in the
|
||||
# python module links, and failure due to missing symbols
|
||||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
DPKG_EXPORT_BUILDFLAGS = 1
|
||||
include /usr/share/dpkg/buildflags.mk
|
||||
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
|
||||
build3vers := $(shell py3versions -sv)
|
||||
|
||||
#build qt5 UI
|
||||
export QT_SELECT := qt5
|
||||
|
||||
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||
NJOBS := -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||
endif
|
||||
|
||||
# main packaging script based on dh7 syntax
|
||||
%:
|
||||
dh $@ --parallel --with python2 --with python3 --with autotools-dev
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- --enable-recollq --enable-xadump
|
||||
|
||||
build3vers := $(shell py3versions -sv)
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install
|
||||
(cd python/recoll; libdir=/usr/lib/$${DEB_BUILD_MULTIARCH} python2 \
|
||||
./setup.py install \
|
||||
--install-layout=deb \
|
||||
--prefix=/usr \
|
||||
--root=$(CURDIR)/debian/tmp/usr )
|
||||
set -e && for i in $(build3vers); do \
|
||||
(cd python/recoll; libdir=/usr/lib/$${DEB_BUILD_MULTIARCH} python$$i \
|
||||
./setup.py install \
|
||||
--install-layout=deb \
|
||||
--prefix=/usr \
|
||||
--root=$(CURDIR)/debian/tmp/ ) ; \
|
||||
done
|
||||
(cd python/pychm; python2 ./setup.py install \
|
||||
--install-layout=deb \
|
||||
--prefix=/usr \
|
||||
--root=$(CURDIR)/debian/tmp/ )
|
||||
set -e && for i in $(build3vers); do \
|
||||
(cd python/pychm; python$$i ./setup.py install \
|
||||
--install-layout=deb \
|
||||
--prefix=/usr \
|
||||
--root=$(CURDIR)/debian/tmp/ ) ; \
|
||||
done
|
||||
find $(CURDIR) -type f -name '*.la' -exec rm -f '{}' \;
|
||||
find $(CURDIR) -type f -name '*.pyc' -exec rm -f '{}' \;
|
||||
rm -rf $(CURDIR)/debian/tmp/usr/lib/python*/*/*/__pycache__
|
||||
Loading…
x
Reference in New Issue
Block a user