home » zplus/dokk.git
ID: 42fda9137b4e93a2c7e30bdc5c66b7a311600d98
41 lines — 1K — View raw


SHELL = /bin/bash

REPOSITORY = https://github.com/searxng/searxng.git

check_env_vars:
ifdef OUTPUT_PATH
OUTPUT_PATH := ${OUTPUT_PATH}/searxng
else
	$(error OUTPUT_PATH is undefined)
endif

repository:
	git clone ${REPOSITORY} repository

# This repo doesn't use tags for releases, therefore we checkout specific commits.
# The date is the commit's date.
# Also, they're using a very complex build system. For this reason we run their Makefile
# which creates its own Python virtual environment
#
# Requires a few packages in order to compile:
# - texlive-full
# - curl
2023-12-11-8a4104b9: check_env_vars repository
	# By default, the Makefile will use "sphinx-build -b html"
	# For generating "dirhtml" output, change the flag inside utils/lib.sh.
	# Unfortunately the build script is too complex and this is the simplest solution.

	# Extract commit hash
	commit_hash=$@
	commit_hash=$${commit_hash:11}

	mkdir --parents "${OUTPUT_PATH}"
	cd repository
	git checkout $${commit_hash}
	make docs.clean docs.html
	cp --recursive dist/docs/ "${OUTPUT_PATH}/$@"

.ONESHELL:
.SUFFIXES:
.PHONY:
.DELETE_ON_ERROR: