11#! /bin/sh
22
3+ # MUST run from the directory where the build happens (distrohome/deb11 or ~/appimage-build on the VM
4+
35# Note: this supposes that all used python version have been built
46# from source and installed with make altinstall, and that a
57# py3versions program is found in the PATH before the system one, and
@@ -13,27 +15,29 @@ fatal()
1315 exit 1
1416}
1517
16- DOCKHOME=/home/dockes/tmp/distrohomes/deb11
18+ BUILDTOP= ` pwd `
1719RCLDISTS=/home/dockes/projets/fulltext/web-recoll
1820RCLSRC=/home/dockes/projets/fulltext/recoll
1921
2022FROMGIT=0
2123RECOLL_VERSION=1.43.14
2224
23- UNRTF=$DOCKHOME /unrtf-0.21.11
24- ANTIWORD=$DOCKHOME /antiword
25+ UNRTF=unrtf-0.21.11
26+ ANTIWORD=antiword
27+
28+ DEPLOYBINDIR=~ /.local/bin
2529
26- APPDIR=$DOCKHOME /AppDir/
27- DEPLOYBINDIR=$DOCKHOME /.local/bin
28- BUILDDIR=$DOCKHOME /build
30+ APPDIR=$BUILDTOP /AppDir/
31+ BUILDDIR=$BUILDTOP /recoll-build
2932# NOTE: delete the builddir when changing versions. Not done automatically because complicated
3033# rm -rf $BUILDDIR
3134
3235if test $FROMGIT -ne 0; then
3336 RECOLL=/home/dockes/projets/fulltext/recoll/src
3437else
35- RECOLL=$DOCKHOME /recoll-${RECOLL_VERSION}
36- test -d $RECOLL || (cd $DOCKHOME && tar xf $RCLDISTS /recoll-${RECOLL_VERSION} .tar.gz) || \
38+ # TBD: Replace this with curl or wget from the web site so we don't need a local copy on the VM ?
39+ RECOLL=$BUILDTOP /recoll-${RECOLL_VERSION}
40+ test -d $RECOLL || (cd $BUILDTOP && tar xf $RCLDISTS /recoll-${RECOLL_VERSION} .tar.gz) || \
3741 fatal source extraction
3842fi
3943
@@ -42,15 +46,16 @@ auxprogs()
4246 # This works because:
4347 # - We change the apps to find their resources relative to the exec. Ok for antiword and unrtf
4448 # - We make sure that the PATH is ok for the handlers to find them in the mounted bin
45-
49+ cd || exit 1
50+
4651 echo " Building UNRTF"
47- cd $UNRTF
52+ cd $BUILDTOP / $ UNRTF || exit 1
4853 ./configure --prefix=/usr
4954 make -j 4 || exit 1
5055 make install DESTDIR=$APPDIR || exit 1
5156
5257 echo " Building ANTIWORD"
53- cd $ANTIWORD
58+ cd $BUILDTOP / $ ANTIWORD
5459 make -f Makefile.Linux
5560 cp antiword $APPDIR /usr/bin/ || exit 1
5661 mkdir -p $APPDIR /usr/share/antiword || exit 1
@@ -76,14 +81,14 @@ DESTDIR=$APPDIR ninja -C ${BUILDDIR} install || exit 1
7681echo ; echo ALSO INSTALLING TO /usr FOR PYTHON BUILDS
7782sudo ninja -C ${BUILDDIR} install || exit 1
7883
79- echo ; Copying Python binary extension shared objects
84+ echo Copying Python binary extension shared objects
8085cp ${BUILDDIR} /python/recoll/* .so $APPDIR /usr/lib/python3/dist-packages/recoll || exit 1
8186cp ${BUILDDIR} /python/pychm/* .so $APPDIR /usr/lib/python3/dist-packages/recollchm || exit 1
8287cp ${BUILDDIR} /python/pyaspell/* .so $APPDIR /usr/lib/python3/dist-packages/ || exit 1
8388
8489auxprogs
8590
86- cd
91+ cd $BUILDTOP
8792$DEPLOYBINDIR /linuxdeploy-x86_64.AppImage \
8893 --appdir $APPDIR \
8994 --custom-apprun=$RCLSRC /packaging/appimage/AppRun \
0 commit comments