View | Details | Raw Unified | Return to bug 231401
Collapse All | Expand All

(-)www/py-searx/Makefile (-47 lines)
Lines 1-47 Link Here
1
# Created by: Loic Blot <loic.blot@unix-experience.fr>
2
# $FreeBSD$
3
4
PORTNAME=	searx
5
DISTVERSION=	0.14.0
6
CATEGORIES=	www python
7
MASTER_SITES=	CHEESESHOP
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
9
10
MAINTAINER=	loic.blot@unix-experience.fr
11
COMMENT=	Privacy-respecting, hackable metasearch engine
12
13
LICENSE=	AGPLv3
14
15
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}certifi>0:security/py-certifi@${PY_FLAVOR} \
16
		${PYTHON_PKGNAMEPREFIX}dateutil>0:devel/py-dateutil@${PY_FLAVOR} \
17
		${PYTHON_PKGNAMEPREFIX}Flask>0:www/py-flask@${PY_FLAVOR} \
18
		${PYTHON_PKGNAMEPREFIX}Flask-Babel>0:devel/py-flask-babel@${PY_FLAVOR} \
19
		${PYTHON_PKGNAMEPREFIX}lxml>0:devel/py-lxml@${PY_FLAVOR} \
20
		${PYTHON_PKGNAMEPREFIX}ndg_httpsclient>0:net/py-ndg_httpsclient@${PY_FLAVOR} \
21
		${PYTHON_PKGNAMEPREFIX}openssl>0:security/py-openssl@${PY_FLAVOR} \
22
		${PYTHON_PKGNAMEPREFIX}pygments>0:textproc/py-pygments@${PY_FLAVOR} \
23
		${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
24
		${PYTHON_PKGNAMEPREFIX}splinter>0:www/py-splinter@${PY_FLAVOR} \
25
		${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} \
26
		${PYTHON_PKGNAMEPREFIX}werkzeug>0:www/py-werkzeug@${PY_FLAVOR}
27
28
USES=		python:2.7
29
USE_PYTHON=	distutils autoplist
30
NO_ARCH=	yes
31
USE_RC_SUBR=	searx
32
33
SUB_FILES=	searx pkg-message
34
SUB_LIST=	PYTHON_CMD=${PYTHON_CMD} PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR}
35
36
post-patch: # expect dependencies to be backwards-compatible, otherwise it is difficult to have a port
37
	@${REINPLACE_CMD} -e 's|==|>=|' ${WRKSRC}/requirements.txt
38
39
post-install:
40
	# workaround for https://github.com/asciimoo/searx/issues/1208
41
	@${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/tests
42
	@${REINPLACE_CMD} -e 's|.*/tests/.*||' ${_PYTHONPKGLIST}
43
	# move settings to etc/ /usr/local/lib/python2.7/site-packages/searx/settings.yml
44
	@${MV} ${STAGEDIR}${PYTHON_SITELIBDIR}/searx/settings.yml ${STAGEDIR}${PREFIX}/etc/${PORTNAME}-settings.yml.sample
45
	@${LN} -s ${PREFIX}/etc/${PORTNAME}-settings.yml ${STAGEDIR}${PYTHON_SITELIBDIR}/searx/settings.yml
46
47
.include <bsd.port.mk>
(-)www/py-searx/distinfo (-3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1519173150
2
SHA256 (searx-0.14.0.tar.gz) = 0efa8e6359e933dc63f6922e201bdd7b21c30f7ed43edb308a2312e57b45dc83
3
SIZE (searx-0.14.0.tar.gz) = 1591201
(-)www/py-searx/files/pkg-message.in (-15 lines)
Lines 1-15 Link Here
1
======================================================================
2
You installed Searx: privacy-respecting, hackable metasearch engine.
3
4
It is recommended to run Searx as a service:
5
# sysrc searx_enable="YES"
6
# service searx start
7
8
It allows you to search the Internet through the local website at
9
http://localhost:8888
10
11
By default, Searx uses the network of long running Searx instances.
12
You can see the list here: http://stats.searx.oe5tpo.com
13
14
Please adjust Searx settings in %%PREFIX%%/etc/searx-settings.yml
15
======================================================================
(-)www/py-searx/files/searx.in (-48 lines)
Lines 1-48 Link Here
1
#!/bin/sh
2
# $FreeBSD$
3
4
# PROVIDE: searx
5
# REQUIRE: DAEMON NETWORKING
6
# BEFORE: LOGIN
7
# KEYWORD: shutdown
8
9
# Add the following lines to /etc/rc.conf to enable searx:
10
# searx_enable="YES"
11
#
12
# searx_enable (bool):	Set to YES to enable searx
13
#				Default: NO
14
# searx_conf (str):		searx configuration file
15
#				Default: ${PREFIX}/etc/searx.conf
16
# searx_user (str):		searx daemon user
17
#				Default: searx
18
# searx_group (str):		searx daemon group
19
#				Default: searx
20
# searx_flags (str):		Extra flags passed to searx
21
22
. /etc/rc.subr
23
24
name="searx"
25
rcvar=searx_enable
26
27
: ${searx_enable:="NO"}
28
: ${searx_user:="www"}
29
: ${searx_group:="www"}
30
: ${searx_flags:=""}
31
32
# daemon
33
pidfile="/var/run/${name}.pid"
34
python="%%PYTHON_CMD%%"
35
script_py="%%PYTHON_SITELIBDIR%%/${name}/webapp.py"
36
command=/usr/sbin/daemon
37
procname="daemon"
38
command_args=" -c -f -P ${pidfile} ${python} ${script_py}"
39
start_precmd="searx_precmd"
40
41
searx_precmd()
42
{
43
    install -o ${searx_user} /dev/null ${pidfile}
44
}
45
46
load_rc_config $name
47
run_rc_command "$1"
48
(-)www/py-searx/pkg-descr (-19 lines)
Lines 1-19 Link Here
1
Searx is a free internet metasearch engine which aggregates results
2
from more than 70 search services. Users are neither tracked nor profiled.
3
Additionally, searx can be used over Tor for online anonymity.
4
5
Get started with searx by using one of the public instances. If you don't
6
trust anyone, you can set up your own service.
7
8
Features:
9
* Self hosted
10
* No user tracking
11
* No user profiling
12
* About 70 supported search engines
13
* Easy integration with any search engine
14
* Cookies are not used by default
15
* Secure, encrypted connections (HTTPS/SSL)
16
* Hosted by organisations, such as La Quadrature du Net, which promote
17
  digital rights
18
19
WWW: https://asciimoo.github.io/searx/
(-)www/py-searx/pkg-plist (-1 lines)
Line 1 Link Here
1
@sample etc/searx-settings.yml.sample
(-)www/searx/Makefile (-1 lines)
Lines 5-11 Link Here
5
DISTVERSION=	0.14.0
5
DISTVERSION=	0.14.0
6
CATEGORIES=	www python
6
CATEGORIES=	www python
7
MASTER_SITES=	CHEESESHOP
7
MASTER_SITES=	CHEESESHOP
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
9
8
10
MAINTAINER=	loic.blot@unix-experience.fr
9
MAINTAINER=	loic.blot@unix-experience.fr
11
COMMENT=	Privacy-respecting, hackable metasearch engine
10
COMMENT=	Privacy-respecting, hackable metasearch engine

Return to bug 231401