diff --git a/irc/py-sopel/Makefile b/irc/py-sopel/Makefile index d9d985da2f0c..c08e5ce849ea 100644 --- a/irc/py-sopel/Makefile +++ b/irc/py-sopel/Makefile @@ -1,50 +1,56 @@ PORTNAME= sopel DISTVERSION= 7.1.9 +PORTREVISION= 1 CATEGORIES= irc python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= DtxdF@disroot.org COMMENT= Easy-to-use and highly extensible IRC Bot framework WWW= https://sopel.chat/ LICENSE= EFLv2 LICENSE_GROUPS= FSF GPL OSI LICENSE_NAME= Eiffel Forum License, version 2 LICENSE_FILE= ${WRKSRC}/COPYING LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dnspython>0:dns/py-dnspython@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}GeoIP2>0:net/py-GeoIP2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}importlib-metadata>0:devel/py-importlib-metadata@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}praw>0:www/py-praw@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytz>0:devel/py-pytz@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sqlalchemy13>0:databases/py-sqlalchemy13@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}urllib3>0:net/py-urllib3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}xmltodict>=0.12:devel/py-xmltodict@${PY_FLAVOR} USES= python USE_PYTHON= autoplist distutils USE_RC_SUBR= sopel SUB_FILES+= pkg-message SUB_LIST+= PYTHON_CMD=${PYTHON_CMD} USERS= sopel GROUPS= sopel PLIST_SUB= GROUP="${GROUPS:[0]}" \ USER="${USERS:[0]}" post-install: @${MKDIR} ${STAGEDIR}/${ETCDIR} @${CP} ${FILESDIR}/sopel-default.cfg ${STAGEDIR}/${ETCDIR}/sopel-default.cfg.sample .for dir in run log db @${MKDIR} ${STAGEDIR}/var/${dir}/sopel .endfor @${MKDIR} ${STAGEDIR}/var/db/sopel/www +.for script in sopel sopel-config sopel-plugins + ${CP} ${FILESDIR}/${script}.py ${STAGEDIR}${PREFIX}/bin/${script} + @${REINPLACE_CMD} -e "s|%%PYTHON_SHEBANG%%|#!${PYTHON_CMD}|" ${STAGEDIR}${PREFIX}/bin/${script} + ${CHMOD} 555 ${STAGEDIR}${PREFIX}/bin/${script} +.endfor .include diff --git a/irc/py-sopel/files/patch-requirements.txt b/irc/py-sopel/files/patch-requirements.txt deleted file mode 100644 index b04c63825266..000000000000 --- a/irc/py-sopel/files/patch-requirements.txt +++ /dev/null @@ -1,37 +0,0 @@ ---- requirements.txt.orig 2023-02-26 10:45:58 UTC -+++ requirements.txt -@@ -1,27 +1,8 @@ --xmltodict<0.12.0; python_version == '3.3' --xmltodict==0.12; python_version != '3.3' -+xmltodict - pytz --praw>=4.0.0,<6.0.0 --# transitive dependency of praw; v0.18 introduced f-string syntax --update-checker<0.18; python_version < '3.6' --geoip2<3.0; python_version <= '3.5' and python_version != '2.7' --geoip2>=3.0,<4.0; python_version == '2.7' --geoip2>=4.0,<5.0; python_version >= '3.6' --# transitive dependency of geoip2; v2 dropped py2.7 & py3 < 3.6 --maxminddb<2.0; python_version < '3.6' --ipaddress<2.0; python_version < '3.3' --requests>=2.24.0,<3.0.0; python_version != '3.3' and python_version != '3.4' --# py3.3 doesn't work with the chardet/charset-normalizer detection added in 2.26 --requests>=2.24.0,<2.26; python_version == '3.3' --# py3.4 isn't supported after requests 2.21 --requests==2.21.0; python_version == '3.4' --# transitive dependency of requests --# 2.0 will drop EOL Python 2.7 & 3.5, just like Sopel 8 plans to --urllib3<1.27; python_version != '3.3' and python_version != '3.4' --urllib3<1.23; python_version == '3.3' --urllib3<1.25; python_version == '3.4' --dnspython<2.0; python_version == '2.7' --dnspython<1.16.0; python_version == '3.3' --dnspython<3.0; python_version >= '3.4' --sqlalchemy<1.3; python_version == '3.3' --sqlalchemy<1.4; python_version != '3.3' -+praw -+geoip2 -+requests -+urllib3 -+dnspython -+sqlalchemy diff --git a/irc/py-sopel/files/sopel-config.py b/irc/py-sopel/files/sopel-config.py new file mode 100755 index 000000000000..e42adc5dbe0a --- /dev/null +++ b/irc/py-sopel/files/sopel-config.py @@ -0,0 +1,6 @@ +%%PYTHON_SHEBANG%% + +import sopel.cli.config + +if __name__ == "__main__": + sopel.cli.config.main() diff --git a/irc/py-sopel/files/sopel-plugins.py b/irc/py-sopel/files/sopel-plugins.py new file mode 100755 index 000000000000..4285b2e17839 --- /dev/null +++ b/irc/py-sopel/files/sopel-plugins.py @@ -0,0 +1,6 @@ +%%PYTHON_SHEBANG%% + +import sopel.cli.plugins + +if __name__ == "__main__": + sopel.cli.plugins.main() diff --git a/irc/py-sopel/files/sopel.py b/irc/py-sopel/files/sopel.py new file mode 100755 index 000000000000..57ebbe0e77eb --- /dev/null +++ b/irc/py-sopel/files/sopel.py @@ -0,0 +1,6 @@ +%%PYTHON_SHEBANG%% + +import sopel.cli.run + +if __name__ == "__main__": + sopel.cli.run.main()