# Get the source
cd
test -f installed/xapian-core-1.4.23.tar.xz &&
mv -f installed/xapian-core-1.4.23.tar.xz .
test ! -f xapian-core-1.4.23.tar.xz &&
wget https://oligarchy.co.uk/xapian/1.4.23/xapian-core-1.4.23.tar.xz
# Verify the source with sha256sum:
echo "30d3518172084f310dab86d262b512718a7f9a13635aaa1a188e61dc26b228\
8c xapian-core-1.4.23.tar.xz" | sha256sum -c
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "xapian-core-*" -exec rm -r {} \;
tar xJvf ~/xapian-core-1.4.23.tar.xz
cd xapian-core-1.4.23
test $UID = 0 && chown -R root:root .
# If this is an upgrade...
# See the git repository for full list of changes
# See NEWS for a brief summary of changes:
# https://xapian.org/docs/xapian-core-1.4.23/NEWS
# or run:
# less ./NEWS
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --prefix=/usr --docdir=/usr/doc/xapian-core-1.4.23 \
--libdir=/usr/lib64 --mandir=/usr/man
# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --prefix=/usr --docdir=/usr/doc/xapian-core-1.4.23 \
--mandir=/usr/man
# Build it
make
# Check the build (can take a very long time)
make check
# Become root to install
su
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg xapian-core
# Install it
make install
ldconfig
# Become your non-root user again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/xapian-core-*.tar.*
mv xapian-core-1.4.23.tar.xz installed/
# If you ever want to uninstall xapian-core, this should do it:
# ('make uninstall' as root should do it, the rest is just in case)
# (proofread this before blindly running it in case I made a typo)
cd
su
test -d src/xapian-core-* && ( cd src/xapian-core-* ; make uninstall )
( cd /usr/bin
rm -f copydatabase quest simpleexpand simpleindex simplesearch xapian-* )
find /usr/doc -maxdepth 1 -type d -name "xapian-core-*" -exec rm -r {} \;
test -d /usr/include/xapian && rm -r /usr/include/xapian
for pfx in /usr/lib /usr/lib64; do
( cd $pfx
test -d ${pfx}/cmake/xapian && rm -r ${pfx}/cmake/xapian
rm -f ${pfx}/libxapian.* ${pfx}/pkgconfig/xapian-core.pc )
done
( cd /usr/man/man1
rm -f copydatabase.1 quest.1 xapian-*.1 )
test -d /usr/share/xapian-core && rm -r /usr/share/xapian-core
rm -f /usr/include/xapian.h /usr/share/aclocal/xapian.m4
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "xapian-core-*" -exec rm -r {} \;
rm -f ~/installed/xapian-core-*.tar.*