freebsd-ports/www/py-searx/Makefile
Yuri Victorovich 780adec659 www/py-searx: Update to 0.14.0
Port changes:
* Changed DISTVERSION
* Switched to CHEESESHOP
* Updated COMMENT
* Updated RUN_DEPENDS
* Replaced USE_PYTHON=concurrent with USE_PYTHON=noflavors
* Patched requirements.txt to require on >= basis
* Removed tests inslall (conflicts with other such packages)
* Move settings under /etc
* In searx.in, used %%PYTHON_CMD%% instead of the hardcoded command
* Fixed searx.in to actually start and stop the service (it was broken)
* Added pkg-message explaining how to use it

Testing:
* runs fine

This package allows you to get rid of tracking by the search providers
(google, bing, etc). You can either use the local service on
http://localhost:8888, or one of the external instances, ex. https://searx.me/

PR:		226055
Submitted by:	loic.blot@unix-experience.fr (maintainer)
Approved by:	tcberner (mentor, implicit)
2018-03-09 08:34:57 +00:00

47 lines
2 KiB
Makefile

# Created by: Loic Blot <loic.blot@unix-experience.fr>
# $FreeBSD$
PORTNAME= searx
DISTVERSION= 0.14.0
CATEGORIES= www python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= loic.blot@unix-experience.fr
COMMENT= Privacy-respecting, hackable metasearch engine
LICENSE= AGPLv3
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}certifi>0:security/py-certifi@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}dateutil>0:devel/py-dateutil@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}Flask>0:www/py-flask@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}Flask-Babel>0:devel/py-flask-babel@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}lxml>0:devel/py-lxml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}ndg_httpsclient>0:net/py-ndg_httpsclient@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}openssl>0:security/py-openssl@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pygments>0:textproc/py-pygments@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}splinter>0:www/py-splinter@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}werkzeug>0:www/py-werkzeug@${PY_FLAVOR}
USES= python
USE_PYTHON= distutils autoplist noflavors
NO_ARCH= yes
USE_RC_SUBR= searx
SUB_FILES= searx pkg-message
SUB_LIST= PYTHON_CMD=${PYTHON_CMD} PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR}
post-patch: # expect dependencies to be backwards-compatible, otherwise it is difficult to have a port
@${REINPLACE_CMD} -e 's|==|>=|' ${WRKSRC}/requirements.txt
post-install:
# workaround for https://github.com/asciimoo/searx/issues/1208
@${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/tests
@${REINPLACE_CMD} -e 's|.*/tests/.*||' ${_PYTHONPKGLIST}
# move settings to etc/ /usr/local/lib/python2.7/site-packages/searx/settings.yml
@${MV} ${STAGEDIR}${PYTHON_SITELIBDIR}/searx/settings.yml ${STAGEDIR}${PREFIX}/etc/${PORTNAME}-settings.yml.sample
@${LN} -s ${PREFIX}/etc/${PORTNAME}-settings.yml ${STAGEDIR}${PYTHON_SITELIBDIR}/searx/settings.yml
.include <bsd.port.mk>