Commit 1b9cb605 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

Build and install the python module by default

parent 5bcf17a2
......@@ -67,6 +67,8 @@ src/lib/alldeps
src/lib/librcl.a
src/mk/localdefs
src/mk/sysconf
src/python/recoll/build
src/python/recoll/setup.py
src/qtgui/.moc/*
src/qtgui/.obj/*
src/qtgui/.ui/*
......
......@@ -5,7 +5,7 @@
# sudo apt-get install pkg-kde-tools cdbs
RCLVERS=1.17.0
PPAVERS=1
PPAVERS=0
case $RCLVERS in
[23]*) PPANAME=recollexp-ppa;;
......@@ -18,7 +18,7 @@ debdir=debianrclqt4
series4="lucid maverick natty oneiric precise"
rm -rf recoll-${RCLVERS}/debian
cp -rp $debdir recoll-${RCLVERS}/debian
cp -rp ${debdir}/ recoll-${RCLVERS}/debian
for series in $series4 ; do
if test -f $debdir/control-$series ; then
......@@ -42,7 +42,7 @@ seriesk=""
debdir=debiankio
rm -rf recoll-${RCLVERS}/debian
cp -rp $debdir recoll-${RCLVERS}/debian
cp -rp ${debdir}/ recoll-${RCLVERS}/debian
for series in $seriesk ; do
sed -e s/SERIES/$series/g < ${debdir}/changelog > \
recoll-${RCLVERS}/debian/changelog ;
......
......@@ -5,17 +5,19 @@ Maintainer: Jean-Francois Dockes <jf@dockes.org>
Build-Depends: debhelper (>= 7),
autotools-dev,
libqt4-dev,
libqtwebkit-dev,
libqtwebkit-dev,
libxapian-dev (>= 1.0.15),
libx11-dev,
libz-dev
libz-dev,
python-dev,
quilt
Standards-Version: 3.8.3
Package: recoll
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Recommends: aspell, python
Suggests: antiword, catdoc, ghostscript, libimage-exiftool-perl, poppler-utils, unrtf, python-mutagen, xsltproc
Recommends: aspell, python, xsltproc
Suggests: antiword, catdoc, ghostscript, libimage-exiftool-perl, poppler-utils, unrtf, python-mutagen
Description: a personal full text search package with a QT GUI
The Recoll personal full text search package is based on a very strong
backend (Xapian), for which it provides an easy to use and feature-rich
......
......@@ -7,14 +7,16 @@ Build-Depends: debhelper (>= 7),
libqt4-dev,
libxapian-dev (>= 1.0.15),
libx11-dev,
libz-dev
libz-dev,
python-dev,
quilt
Standards-Version: 3.8.3
Package: recoll
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Recommends: aspell, python
Suggests: antiword, catdoc, ghostscript, libimage-exiftool-perl, poppler-utils, unrtf, python-mutagen, xsltproc
Recommends: aspell, python, xsltproc
Suggests: antiword, catdoc, ghostscript, libimage-exiftool-perl, poppler-utils, unrtf, python-mutagen
Description: a personal full text search package with a QT GUI
The Recoll personal full text search package is based on a very strong
backend (Xapian), for which it provides an easy to use and feature-rich
......
setup.py --root and --user options interfer with debian wanting a dist-packages,
not site-packages installation for python modules
--- a/recollinstall.in
+++ b/recollinstall.in
@@ -139,5 +139,4 @@
${datadir}/recoll/translations/recoll_zh.qm || exit 1
-@NOPYTHON@(cd python/recoll;python setup.py install \
- --prefix=${REALPREFIX} ${ROOTFORPYTHON})
+#@NOPYTHON@(cd python/recoll;python setup.py install \
+# --prefix=${REALPREFIX} ${ROOTFORPYTHON})
#!/usr/bin/make -f
include /usr/share/quilt/quilt.make
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
......@@ -7,7 +9,7 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS = -Wall -g
LDFLAGS = -Wl,-z,defs
#LDFLAGS = -Wl,-z,defs
#build qt4 UI only
export QMAKE=qmake-qt4
......@@ -27,12 +29,12 @@ config.status: configure
--prefix=/usr
build: build-stamp
build-stamp: config.status
build-stamp: $(QUILT_STAMPFN) config.status
dh_testdir
$(MAKE)
touch $@
clean:
clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp config.log
......@@ -44,8 +46,8 @@ install:
dh_testroot
dh_prep
dh_installdirs
$(MAKE) prefix=$(CURDIR)/debian/recoll/usr install
(cd python/recoll;python setup.py install --install-layout=deb --root=$(CURDIR)/debian/recoll/ )
binary-arch: build install
dh_testdir
......
......@@ -15,7 +15,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
License: GPL
# libxapian-devel or xapian-core-devel?
BuildRequires: libqt4-devel zlib-devel xapian-core-devel libuuid-devel
BuildRequires: libqt4-devel zlib-devel libxapian-devel libuuid-devel python-devel
%description
Recoll is a personal full text search package for Linux, FreeBSD and
......@@ -51,6 +51,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_bindir}/*
%{python_sitearch}/
%{_datadir}/%{name}
%{_datadir}/applications/recoll-searchgui.desktop
%{_datadir}/icons/hicolor/48x48/apps/recoll.png
......
......@@ -16,6 +16,7 @@ all: mk/sysconf
${MAKE} -C index recollindex
@NOQTMAKE@(cd $(QTGUI); ${QMAKE} recoll.pro)
@NOQTMAKE@${MAKE} -C $(QTGUI) depth=..
@NOPYTHON@${MAKE} -C python/recoll
${MAKE} -C query recollq
mk/sysconf:
......@@ -40,6 +41,8 @@ clean:
${MAKE} -C lib clean
${MAKE} -C query clean
${MAKE} -C utils clean
-${MAKE} -C desktop/unity-lens-recoll clean
-${MAKE} -C python/recoll clean
@NOQTMAKE@@-${MAKE} -C $(QTGUI) clean
rm -f qtgui/Makefile qtgui/confgui/Makefile qtgui/recoll
rm -f filters/rclexecm.pyc
......@@ -51,6 +54,8 @@ clean:
# Note: we don't remove the top Makefile, to keep the "clean" targets
# available but a "Make" won't work without a configure anyway
distclean: clean
-${MAKE} -C desktop/unity-lens-recoll distclean
-${MAKE} -C python/recoll distclean
rm -f mk/sysconf mk/localdefs sampleconf/recoll.conf \
qtgui/recoll.pro \
config.log config.status \
......
......@@ -602,6 +602,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
RCLVERSION
NOPYTHON
NOPIC
LIBQZEITGEIST
QMAKE_DISABLE_ZEITGEIST
......@@ -692,6 +693,7 @@ with_inotify
with_fam
enable_xattr
enable_camelcase
enable_python_module
enable_pic
enable_qtgui
enable_webkit
......@@ -1341,9 +1343,10 @@ Optional Features:
manual" and "my sql manual" are the same, but not
the same as "mysql manual" (in phrases only and you
could raise the phrase slack to get a match).
--enable-pic Compile library objects as position independant
code. This is necessary for building the php
extension.
--disable-python-module Do not build the Python module.
--enable-pic Do not compile library objects as position
independant code. This is incompatible with the php
or python extensions.
--disable-qtgui Disable the QT-based graphical user interface.
--disable-webkit Disable use of qt-webkit.
--disable-x11mon Disable recollindex support for X11 session
......@@ -4343,21 +4346,43 @@ $as_echo "#define RCL_SPLIT_CAMELCASE 1" >>confdefs.h
fi
# Build PIC objects for the library. This is necessary when building the
# php extension, would be useful for the others, and costs little. I wonder
# if this should be made the default.
# Not by default as these are little used for now.
# Disable building the python module. This is built by default, because
# it's really the easiest way to interface and extend recoll. It forces PIC
# objects for everything (indexing performance impact: 1%), because it's
# just not worth building the lib twice
# You can still have a non-pic recoll with:
# configure --disable-python-module; make; make install;make clean
# configure; make; cd python/recoll; make install
#
# Check whether --enable-python-module was given.
if test "${enable_python_module+set}" = set; then :
enableval=$enable_python_module; pythonEnabled=$enableval
else
pythonEnabled=yes
fi
if test X$pythonEnabled = Xyes ; then
NOPYTHON=""
else
NOPYTHON="#"
fi
# Build PIC objects for the library ?
# Check whether --enable-pic was given.
if test "${enable_pic+set}" = set; then :
enableval=$enable_pic; picEnabled=$enableval
else
picEnabled=no
picEnabled=forpython
fi
if test X$picEnabled = Xyes ; then
NOPIC=""
else
NOPIC="#"
case $picEnabled in
forpython) picEnabled=$pythonEnabled; NOPIC=$NOPYTHON;;
yes) NOPIC="";;
*) NOPIC="#";;
esac
if test X$pythonEnabled = Xyes -a X$picEnabled != Xyes; then
as_fn_error $? "Python build needs PIC library" "$LINENO" 5
fi
for ac_func in mkdtemp
......@@ -5644,6 +5669,7 @@ RCLVERSION='1.17.0'
# All object files depend on localdefs which has the cc flags. Avoid
......@@ -5658,6 +5684,8 @@ ac_config_files="$ac_config_files sampleconf/recoll.conf"
ac_config_files="$ac_config_files common/rclversion.h"
ac_config_files="$ac_config_files python/recoll/setup.py"
for d in bincimapmime index lib query
do
......@@ -6375,6 +6403,7 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"sampleconf/recoll.conf") CONFIG_FILES="$CONFIG_FILES sampleconf/recoll.conf" ;;
"common/rclversion.h") CONFIG_FILES="$CONFIG_FILES common/rclversion.h" ;;
"python/recoll/setup.py") CONFIG_FILES="$CONFIG_FILES python/recoll/setup.py" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
......
......@@ -194,19 +194,38 @@ if test X$camelcaseEnabled = Xyes ; then
AC_DEFINE(RCL_SPLIT_CAMELCASE, 1, [Split camelCase words])
fi
# Build PIC objects for the library. This is necessary when building the
# php extension, would be useful for the others, and costs little. I wonder
# if this should be made the default.
# Not by default as these are little used for now.
# Disable building the python module. This is built by default, because
# it's really the easiest way to interface and extend recoll. It forces PIC
# objects for everything (indexing performance impact: 1%), because it's
# just not worth building the lib twice
# You can still have a non-pic recoll with:
# configure --disable-python-module; make; make install;make clean
# configure; make; cd python/recoll; make install
#
AC_ARG_ENABLE(python-module,
AC_HELP_STRING([--disable-python-module],
[Do not build the Python module.]),
pythonEnabled=$enableval, pythonEnabled=yes)
if test X$pythonEnabled = Xyes ; then
NOPYTHON=""
else
NOPYTHON="#"
fi
# Build PIC objects for the library ?
AC_ARG_ENABLE(pic,
AC_HELP_STRING([--enable-pic],
[Compile library objects as position independant code. This is necessary
for building the php extension.]),
picEnabled=$enableval, picEnabled=no)
if test X$picEnabled = Xyes ; then
NOPIC=""
else
NOPIC="#"
[Do not compile library objects as position independant code.
This is incompatible with the php or python extensions.]),
picEnabled=$enableval, picEnabled=forpython)
case $picEnabled in
forpython) picEnabled=$pythonEnabled; NOPIC=$NOPYTHON;;
yes) NOPIC="";;
*) NOPIC="#";;
esac
if test X$pythonEnabled = Xyes -a X$picEnabled != Xyes; then
AC_MSG_ERROR([Python build needs PIC library])
fi
AC_CHECK_FUNCS(mkdtemp)
......@@ -500,6 +519,7 @@ AC_SUBST(QMAKE_ENABLE_ZEITGEIST)
AC_SUBST(QMAKE_DISABLE_ZEITGEIST)
AC_SUBST(LIBQZEITGEIST)
AC_SUBST(NOPIC)
AC_SUBST(NOPYTHON)
AC_SUBST(RCLVERSION)
# All object files depend on localdefs which has the cc flags. Avoid
......@@ -509,6 +529,7 @@ AC_CONFIG_FILES(recollinstall)
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(sampleconf/recoll.conf)
AC_CONFIG_FILES(common/rclversion.h)
AC_CONFIG_FILES(python/recoll/setup.py)
for d in bincimapmime index lib query
do
......
......@@ -60,6 +60,31 @@ desktop/recoll-searchgui.desktop
desktop/recoll.png
desktop/recoll.xcf
desktop/recollindex.desktop
desktop/unity-lens-recoll/
desktop/unity-lens-recoll/AUTHORS
desktop/unity-lens-recoll/COPYING
desktop/unity-lens-recoll/ChangeLog
desktop/unity-lens-recoll/INSTALL
desktop/unity-lens-recoll/Makefile.am
desktop/unity-lens-recoll/Makefile.in
desktop/unity-lens-recoll/NEWS
desktop/unity-lens-recoll/README
desktop/unity-lens-recoll/acinclude.m4
desktop/unity-lens-recoll/aclocal.m4
desktop/unity-lens-recoll/bin/
desktop/unity-lens-recoll/bin/unity-recoll-daemon.in
desktop/unity-lens-recoll/configure
desktop/unity-lens-recoll/configure.ac
desktop/unity-lens-recoll/data/
desktop/unity-lens-recoll/data/recoll.lens.in
desktop/unity-lens-recoll/data/recollbg24.png
desktop/unity-lens-recoll/data/unity-lens-recoll.service.in
desktop/unity-lens-recoll/install-sh
desktop/unity-lens-recoll/missing
desktop/unity-lens-recoll/py-compile
desktop/unity-lens-recoll/recollscope/
desktop/unity-lens-recoll/recollscope/__init__.py
desktop/unity-lens-recoll/recollscope/rclsearch.py
desktop/xdg-utils-1.0.1/
desktop/xdg-utils-1.0.1/LICENSE
desktop/xdg-utils-1.0.1/scripts/
......@@ -247,8 +272,9 @@ php/sample/shell.php
python/
python/README.txt
python/recoll/
python/recoll/Makefile
python/recoll/pyrecoll.cpp
python/recoll/setup.py
python/recoll/setup.py.in
python/samples/
python/samples/rcldlkp.py
python/samples/rclmbox.py
......@@ -298,6 +324,10 @@ qtgui/i18n/recoll_uk.qm
qtgui/i18n/recoll_uk.ts
qtgui/i18n/recoll_xx.qm
qtgui/i18n/recoll_xx.ts
qtgui/i18n/recoll_zh.qm
qtgui/i18n/recoll_zh.ts
qtgui/i18n/recoll_zh_CN.qm
qtgui/i18n/recoll_zh_CN.ts
qtgui/idxsched.h
qtgui/idxsched.ui
qtgui/images/
......@@ -348,6 +378,8 @@ qtgui/rclhelp.h
qtgui/rclmain.ui
qtgui/rclmain_w.cpp
qtgui/rclmain_w.h
qtgui/rclzg.cpp
qtgui/rclzg.h
qtgui/recoll.h
qtgui/recoll.pro.in
qtgui/recoll.qrc
......
all:
python setup.py build
clean:
rm -rf build
distclean: clean
install:
python setup.py install
rm -f setup.py
......@@ -32,11 +32,14 @@ if test -z "$mandir" ; then
fi
fi
REALPREFIX=$PREFIX
ROOTFORPYTHON=""
if test -n "$DESTDIR" ; then
PREFIX=$DESTDIR/$PREFIX
bindir=$DESTDIR/$bindir
datadir=$DESTDIR/$datadir
mandir=$DESTDIR/$mandir
ROOTFORPYTHON="--root=${DESTDIR}"
fi
echo "Installing to $PREFIX"
......@@ -130,3 +133,11 @@ ${INSTALL} -m 0755 index/rclmon.sh ${datadir}/recoll/examples/ || exit 1
${INSTALL} -m 0444 qtgui/mtpics/*.png ${datadir}/recoll/images || exit 1
${INSTALL} -m 0444 ${I18N}/recoll*.qm ${datadir}/recoll/translations || exit 1
# Install the simplified chinese file as just chinese until I can understand
# if it's possible to have both. zh_CN doesn't seem to work
${INSTALL} -m 0444 ${I18N}/recoll_zh_CN.qm \
${datadir}/recoll/translations/recoll_zh.qm || exit 1
@NOPYTHON@(cd python/recoll;python setup.py install \
--prefix=${REALPREFIX} ${ROOTFORPYTHON})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment