View | Details | Raw Unified | Return to bug 278972 | Differences between
and this patch

Collapse All | Expand All

(-)b/www/py-searxng-devel/Makefile (+57 lines)
Added Link Here
1
PORTNAME=	searxng
2
DISTVERSION=	20240612
3
CATEGORIES=	www python
4
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
5
PKGNAMESUFFIX=	-devel
6
7
MAINTAINER=	DtxdF@disroot.org
8
COMMENT=	Free internet metasearch engine
9
WWW=		https://docs.searxng.org/
10
11
LICENSE=	AGPLv3
12
LICENSE_FILE=	${WRKSRC}/LICENSE
13
14
BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}yaml>=0:devel/py-yaml@${PY_FLAVOR}
15
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}Babel>=0:devel/py-babel@${PY_FLAVOR} \
16
		${PYTHON_PKGNAMEPREFIX}brotli>=0:archivers/py-brotli@${PY_FLAVOR} \
17
		${PYTHON_PKGNAMEPREFIX}certifi>=0:security/py-certifi@${PY_FLAVOR} \
18
		${PYTHON_PKGNAMEPREFIX}fasttext-predict>=0:textproc/py-fasttext-predict@${PY_FLAVOR} \
19
		${PYTHON_PKGNAMEPREFIX}flask-babel>=0:devel/py-flask-babel@${PY_FLAVOR} \
20
		${PYTHON_PKGNAMEPREFIX}flask>=0:www/py-flask@${PY_FLAVOR} \
21
		${PYTHON_PKGNAMEPREFIX}httpx-socks>=0:www/py-httpx-socks@${PY_FLAVOR} \
22
		${PYTHON_PKGNAMEPREFIX}httpx>=0:www/py-httpx@${PY_FLAVOR} \
23
		${PYTHON_PKGNAMEPREFIX}Jinja2>=0:devel/py-Jinja2@${PY_FLAVOR} \
24
		${PYTHON_PKGNAMEPREFIX}langdetect>=0:textproc/py-langdetect@${PY_FLAVOR} \
25
		${PYTHON_PKGNAMEPREFIX}lxml>=0:devel/py-lxml@${PY_FLAVOR} \
26
		${PYTHON_PKGNAMEPREFIX}markdown-it-py>=0:textproc/py-markdown-it-py@${PY_FLAVOR} \
27
		${PYTHON_PKGNAMEPREFIX}pygments>=0:textproc/py-pygments@${PY_FLAVOR} \
28
		${PYTHON_PKGNAMEPREFIX}python-dateutil>=0:devel/py-python-dateutil@${PY_FLAVOR} \
29
		${PYTHON_PKGNAMEPREFIX}pytomlpp>=0:textproc/py-pytomlpp@${PY_FLAVOR} \
30
		${PYTHON_PKGNAMEPREFIX}redis>=0:databases/py-redis@${PY_FLAVOR} \
31
		${PYTHON_PKGNAMEPREFIX}requests>=0:www/py-requests@${PY_FLAVOR} \
32
		${PYTHON_PKGNAMEPREFIX}setproctitle>=0:devel/py-setproctitle@${PY_FLAVOR} \
33
		${PYTHON_PKGNAMEPREFIX}uvloop>=0:devel/py-uvloop@${PY_FLAVOR} \
34
		${PYTHON_PKGNAMEPREFIX}yaml>=0:devel/py-yaml@${PY_FLAVOR}
35
36
USES=		python
37
USE_GITHUB=	yes
38
GH_TAGNAME=	f5eb56b63f250c7804e5e1cf4426e550bc933906
39
USE_PYTHON=	autoplist distutils
40
USE_RC_SUBR=	searxng
41
42
CONFLICTS=	searx
43
44
NO_ARCH=	yes
45
46
SUB_FILES=	searxng
47
SUB_LIST=	PYTHON_CMD=${PYTHON_CMD}
48
49
post-patch: # expect dependencies to be backwards-compatible, otherwise it is difficult to have a port
50
	@${REINPLACE_CMD} -e 's|==|>=|' ${WRKSRC}/requirements.txt
51
52
post-install:
53
# move settings to etc/ /usr/local/lib/python3.x/site-packages/searx/settings.yml
54
	@${MV} ${STAGEDIR}${PYTHON_SITELIBDIR}/searx/settings.yml ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.yml.sample
55
	@${LN} -s ${PREFIX}/etc/${PORTNAME}.yml ${STAGEDIR}${PYTHON_SITELIBDIR}/searx/settings.yml
56
57
.include <bsd.port.mk>
(-)b/www/py-searxng-devel/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1718239572
2
SHA256 (searxng-searxng-20240612-f5eb56b63f250c7804e5e1cf4426e550bc933906_GH0.tar.gz) = 5424c916ba6312fb22d14b7eac268e40995bda073e480b3e6c8e9d63dcd5e087
3
SIZE (searxng-searxng-20240612-f5eb56b63f250c7804e5e1cf4426e550bc933906_GH0.tar.gz) = 4630430
(-)b/www/py-searxng-devel/files/searxng.in (+46 lines)
Added Link Here
1
#!/bin/sh
2
3
# PROVIDE: searxng
4
# REQUIRE: DAEMON NETWORKING
5
# BEFORE: LOGIN
6
# KEYWORD: shutdown
7
#
8
# Configuration settings for searxng in /etc/rc.conf
9
#
10
# searxng_enable (bool):        Enable searxng. (Default=NO)
11
# searxng_user (str):           User to run searxng as. (Default=www)
12
# searxng_group (str):          Group to run searxng as. (Default=www)
13
# searxng_env (str):            Environment variables.
14
#                               (Default=SEARXNG_SETTINGS_PATH="%%PREFIX%%/etc/searxng.yml")
15
# searxng_log (str):            Log file used to store the searxng's output.
16
#                               (Default=/var/log/searxng.log)
17
18
. /etc/rc.subr
19
20
name="searxng"
21
rcvar=searxng_enable
22
23
: ${searxng_enable:="NO"}
24
: ${searxng_user:="www"}
25
: ${searxng_group:="www"}
26
: ${searxng_env:="SEARXNG_SETTINGS_PATH=\"%%PREFIX%%/etc/searxng.yml\""}
27
: ${searxng_log:="/var/log/searxng.log"}
28
29
# daemon
30
pidfile="/var/run/${name}.pid"
31
command=/usr/sbin/daemon
32
procname="daemon"
33
command_args=" -c -o ${searxng_log} -P ${pidfile} %%PYTHON_CMD%% %%PREFIX%%/bin/searxng-run"
34
start_precmd="searxng_precmd"
35
36
searxng_precmd()
37
{
38
	install -o ${searxng_user} /dev/null ${pidfile}
39
40
	if [ ! -f "${searxng_log}" ]; then
41
		install -o ${searxng_user} -m 640 /dev/null "${searxng_log}"
42
	fi
43
}
44
45
load_rc_config $name
46
run_rc_command "$1"
(-)b/www/py-searxng-devel/pkg-descr (+4 lines)
Added Link Here
1
SearXNG is a free internet metasearch engine which aggregates results
2
from more than 70 search services. Users are neither tracked nor
3
profiled. Additionally, SearXNG can be used over Tor for online
4
anonymity.
(-)b/www/py-searxng-devel/pkg-message (+8 lines)
Added Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
If you want to use SearxNG in a production environment, use www/nginx, www/apache24,
5
or www/uwsgi. The rc script for this port does not use any of them.
6
EOM
7
}
8
]
(-)b/www/py-searxng-devel/pkg-plist (-1 / +1 lines)
Added Link Here
0
- 
1
@sample etc/searxng.yml.sample

Return to bug 278972