1
0
mirror of https://github.com/ae-utbm/sith.git synced 2025-07-22 09:39:57 +00:00
Files
.github
antispam
club
com
core
auth
fixtures
management
commands
__init__.py
check_fs.py
compilemessages.py
install_xapian.py
install_xapian.sh
markdown.py
populate.py
populate_more.py
repair_fs.py
setup.py
__init__.py
migrations
static
templates
templatetags
tests
views
__init__.py
admin.py
api.py
apps.py
baker_recipes.py
converters.py
fields.py
markdown.py
middleware.py
models.py
operations.py
schemas.py
search_indexes.py
urls.py
utils.py
counter
docs
eboutic
election
forum
galaxy
locale
matmat
pedagogy
rootplace
sas
sith
staticfiles
subscription
trombi
.coveragerc
.env.example
.envrc
.gitattributes
.gitignore
.mailmap
.npmrc
.pre-commit-config.yaml
.python-version
CONTRIBUTING.rst
LICENSE
Procfile.service
Procfile.static
README.md
biome.json
conftest.py
manage.py
mkdocs.yml
openapi-csrf.ts
openapi-ts.config.ts
package-lock.json
package.json
pyproject.toml
tsconfig.json
uv.lock
vite.config.mts
Sith/core/management/commands/install_xapian.sh

48 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
# Originates from https://gist.github.com/jorgecarleitao/ab6246c86c936b9c55fd
# first argument of the script is Xapian version (e.g. 1.2.19)
VERSION="$1"
# Cleanup env vars for auto discovery mechanism
export CPATH=
export LIBRARY_PATH=
export CFLAGS=
export LDFLAGS=
export CCFLAGS=
export CXXFLAGS=
export CPPFLAGS=
# prepare
rm -rf "$VIRTUAL_ENV/packages"
mkdir -p "$VIRTUAL_ENV/packages" && cd "$VIRTUAL_ENV/packages" || exit 1
CORE=xapian-core-$VERSION
BINDINGS=xapian-bindings-$VERSION
# download
echo "Downloading source..."
curl -O "https://oligarchy.co.uk/xapian/$VERSION/${CORE}.tar.xz"
curl -O "https://oligarchy.co.uk/xapian/$VERSION/${BINDINGS}.tar.xz"
# extract
echo "Extracting source..."
tar xf "${CORE}.tar.xz"
tar xf "${BINDINGS}.tar.xz"
# install
echo "Installing Xapian-core..."
cd "$VIRTUAL_ENV/packages/${CORE}" || exit 1
./configure --prefix="$VIRTUAL_ENV" && make -j"$(nproc)" && make install
PYTHON_FLAG=--with-python3
echo "Installing Xapian-bindings..."
cd "$VIRTUAL_ENV/packages/${BINDINGS}" || exit 1
./configure --prefix="$VIRTUAL_ENV" $PYTHON_FLAG XAPIAN_CONFIG="$VIRTUAL_ENV/bin/xapian-config" && make -j"$(nproc)" && make install
# clean
rm -rf "$VIRTUAL_ENV/packages"
# test
python -c "import xapian"