irc/anope-devel: add port: Set of IRC services for IRC networks (development version)

Anope is a set of Services for IRC networks that allows users to
manage their nicks and channels in a secure and efficient way, and
administrators to manage their network with powerful tools.

Anope currently works with:
  - InspIRCd 3 or later
  - UnrealIRCd 6 or later
  - ircd-hybrid 8.2.34 or later
  - ircd-ratbox 3 or later
  - ngIRCd 19.2 or later
  - Plexus 3 or later
  - Solanum (all versions)

Anope could also work with some of the daemons derived by the ones listed
above, but there's no support for them if they work or don't work.

For mysql support, please install -mysql FLAVOR.

Changes from stable version of the port:
- Updated PCRE to PCRE2 lib dependency
- Mysql is now a Flavor
- New option group Regex, Crypto Hashing and TLS
- Added xmlrpc module
- Added Argon2 crypt module
- Added Posix crypt module

Co-authored-by: Siva Mahadevan <me@svmhdvn.name>

PR:		278819
Reported by:	Siva Mahadevan <me@svmhdvn.name>,
		Rafael Grether <devnull@apt322.org> (new maintainer)
This commit is contained in:
Rafael Grether 2025-07-01 21:38:17 +00:00 committed by Hiroki Tagato
parent 19a9244eee
commit 9969ce0222
6 changed files with 398 additions and 0 deletions

108
irc/anope-devel/Makefile Normal file
View File

@ -0,0 +1,108 @@
PORTNAME= anope
DISTVERSION= 2.1.16
CATEGORIES= irc
PKGNAMESUFFIX= -devel-${FLAVOR}
MAINTAINER= devnull@apt322.org
COMMENT= Set of IRC services for IRC networks (development version)
WWW= https://www.anope.org/
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/docs/COPYING
CONFLICTS_INSTALL= anope
FLAVORS= default mysql
FLAVOR?= ${FLAVORS:[1]}
USES= cmake localbase:ldflags
USE_GITHUB= yes
USE_RC_SUBR= anope
CMAKE_ARGS= -DINSTDIR:STRING="${PREFIX}/anope"
CFLAGS_amd64= -fPIC
SUB_FILES= pkg-message
OPTIONS_DEFINE= NLS LDAP SQLITE REDIS XMLRPC
OPTIONS_DEFAULT= OPENSSL SQLITE
OPTIONS_GROUP= REGEX CRYPT
OPTIONS_GROUP_REGEX= PCRE2 POSIX TRE
OPTIONS_GROUP_CRYPT= ENC_POSIX ENC_ARGON
OPTIONS_SINGLE= TLS
OPTIONS_SINGLE_TLS= OPENSSL GNUTLS
OPTIONS_SUB= yes
PCRE2_DESC= Perl Compatible Regular Expressions (v2) Support
POSIX_DESC= POSIX Basic Regular Expression Support
TRE_DESC= TRE Regex Support
XMLRPC_DESC= Allow modules to send and receive XMLRPC
CRYPT_DESC= Crypt Hashing Module
ENC_ARGON_DESC= Argon2 hashing algorithm via libargon2
ENC_POSIX_DESC= Posix crypto hashing
NLS_USES= gettext
LDAP_USES= ldap
OPENSSL_USES= ssl
LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
SQLITE_LIB_DEPENDS= libsqlite3.so:databases/sqlite3
XMLRPC_LIB_DEPENDS= libxmlrpc.so:net/xmlrpc-c
GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
PCRE2_LIB_DEPENDS= libpcre2-8.so:devel/pcre2
ENC_ARGON_LIB_DEPENDS= libargon2.so:security/libargon2
TRE_LIB_DEPENDS= libtre.so:textproc/libtre
REDIS_RUN_DEPENDS= redis>0:databases/redis
.if ${FLAVOR} == mysql
USES+= mysql
CMAKE_ARGS+= -DEXTRA_LIBS:STRING="${LOCALBASE}/lib/mysql/"
PLIST_SUB+= MYSQL=""
.else
PLIST_SUB+= MYSQL="@comment "
.endif
post-patch:
# Avoid conflict with C++20 <version> by adding -bin suffix
@${REINPLACE_CMD} -i .c++20 's/version /version-bin /' \
${WRKSRC}/include/CMakeLists.txt
.if ${FLAVOR} == mysql
${LN} -s ${WRKSRC}/modules/extra/mysql.cpp ${WRKSRC}/modules/
.endif
post-patch-OPENSSL-on:
${LN} -s ${WRKSRC}/modules/extra/ssl_openssl.cpp ${WRKSRC}/modules/
post-patch-GNUTLS-on:
${LN} -s ${WRKSRC}/modules/extra/ssl_gnutls.cpp ${WRKSRC}/modules/
post-patch-LDAP-on:
${LN} -s ${WRKSRC}/modules/extra/ldap.cpp ${WRKSRC}/modules/
post-patch-PCRE2-on:
${LN} -s ${WRKSRC}/modules/extra/regex_pcre2.cpp ${WRKSRC}/modules/
post-patch-POSIX-on:
${LN} -s ${WRKSRC}/modules/extra/regex_posix.cpp ${WRKSRC}/modules/
post-patch-TRE-on:
${LN} -s ${WRKSRC}/modules/extra/regex_tre.cpp ${WRKSRC}/modules/
post-patch-SQLITE-on:
${LN} -s ${WRKSRC}/modules/extra/sqlite.cpp ${WRKSRC}/modules/
post-patch-XMLRPC-on:
${LN} -s ${WRKSRC}/modules/extra/xmlrpc.cpp ${WRKSRC}/modules/
post-patch-ENC_ARGON-on:
${LN} -s ${WRKSRC}/modules/extra/enc_argon2.cpp ${WRKSRC}/modules/
post-patch-ENC_POSIX-on:
${LN} -s ${WRKSRC}/modules/extra/enc_posix.cpp ${WRKSRC}/modules/
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/anope/data/backups
@${MKDIR} ${STAGEDIR}${PREFIX}/anope/logs
.include <bsd.port.mk>

3
irc/anope-devel/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1751384030
SHA256 (anope-anope-2.1.16_GH0.tar.gz) = dffc17e39b21216a064738931de078bb9328d5a615d4173399213c5730c2a933
SIZE (anope-anope-2.1.16_GH0.tar.gz) = 1505103

View File

@ -0,0 +1,27 @@
#!/bin/sh
# PROVIDE: anope
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable anope:
# anope_enable=YES
#
. /etc/rc.subr
name=anope
rcvar=anope_enable
load_rc_config $name
: ${anope_enable:=NO}
: ${anope_user:=nobody}
command=%%PREFIX%%/anope/bin/anope
pidfile=%%PREFIX%%/anope/data/anope.pid
extra_commands=reload
run_rc_command "$1"

View File

@ -0,0 +1,19 @@
[
{ type: install
message: <<EOM
Anope now installs to %%PREFIX%%/anope
EOM
}
{ type: upgrade
maximum_version: 2.1.0
message: <<EOM
If you are upgrading from < 2.1.0, you will need
to migrate your configs to the new format. There
is also a guide to migrate your databases to the
new format. Please read the release notes:
https://www.anope.org/upgrading.html
EOM
}
]

17
irc/anope-devel/pkg-descr Normal file
View File

@ -0,0 +1,17 @@
Anope is a set of Services for IRC networks that allows users to
manage their nicks and channels in a secure and efficient way, and
administrators to manage their network with powerful tools.
Anope currently works with:
- InspIRCd 3 or later
- UnrealIRCd 6 or later
- ircd-hybrid 8.2.34 or later
- ircd-ratbox 3 or later
- ngIRCd 19.2 or later
- Plexus 3 or later
- Solanum (all versions)
Anope could also work with some of the daemons derived by the ones listed
above, but there's no support for them if they work or don't work.
For mysql support, please install -mysql FLAVOR.

224
irc/anope-devel/pkg-plist Normal file
View File

@ -0,0 +1,224 @@
anope/bin/anope
anope/bin/anoperc
anope/conf/anope.example.conf
anope/conf/botserv.example.conf
anope/conf/chanserv.example.conf
anope/conf/chanstats.example.conf
anope/conf/cron.example.sh
anope/conf/global.example.conf
anope/conf/hostserv.example.conf
anope/conf/memoserv.example.conf
anope/conf/modules.example.conf
anope/conf/nickserv.example.conf
anope/conf/operserv.example.conf
anope/data/webcpanel/templates/default/chanserv/access.html
anope/data/webcpanel/templates/default/chanserv/akick.html
anope/data/webcpanel/templates/default/chanserv/chanlist.html
anope/data/webcpanel/templates/default/chanserv/drop.html
anope/data/webcpanel/templates/default/chanserv/main.html
anope/data/webcpanel/templates/default/chanserv/modes.html
anope/data/webcpanel/templates/default/chanserv/set.html
anope/data/webcpanel/templates/default/confirm.html
anope/data/webcpanel/templates/default/cubes.png
anope/data/webcpanel/templates/default/favicon.ico
anope/data/webcpanel/templates/default/hostserv/request.html
anope/data/webcpanel/templates/default/layout/footer.html
anope/data/webcpanel/templates/default/layout/footer.loggedin.html
anope/data/webcpanel/templates/default/layout/header.html
anope/data/webcpanel/templates/default/layout/header.loggedin.html
anope/data/webcpanel/templates/default/login.html
anope/data/webcpanel/templates/default/logo.png
anope/data/webcpanel/templates/default/memoserv/memos.html
anope/data/webcpanel/templates/default/nickserv/alist.html
anope/data/webcpanel/templates/default/nickserv/cert.html
anope/data/webcpanel/templates/default/nickserv/confirm.html
anope/data/webcpanel/templates/default/nickserv/info.html
anope/data/webcpanel/templates/default/operserv/akill.html
anope/data/webcpanel/templates/default/register.html
anope/data/webcpanel/templates/default/style.css
%%NLS%%anope/locale/de_DE/LC_MESSAGES/anope.mo
%%NLS%%anope/locale/el_GR/LC_MESSAGES/anope.mo
%%NLS%%anope/locale/en_US/LC_MESSAGES/anope.mo
%%NLS%%anope/locale/es_ES/LC_MESSAGES/anope.mo
%%NLS%%anope/locale/fr_FR/LC_MESSAGES/anope.mo
%%NLS%%anope/locale/it_IT/LC_MESSAGES/anope.mo
%%NLS%%anope/locale/nl_NL/LC_MESSAGES/anope.mo
%%NLS%%anope/locale/pl_PL/LC_MESSAGES/anope.mo
%%NLS%%anope/locale/pt_PT/LC_MESSAGES/anope.mo
%%NLS%%anope/locale/tr_TR/LC_MESSAGES/anope.mo
anope/modules/botserv.so
anope/modules/bs_assign.so
anope/modules/bs_autoassign.so
anope/modules/bs_badwords.so
anope/modules/bs_bot.so
anope/modules/bs_botlist.so
anope/modules/bs_control.so
anope/modules/bs_info.so
anope/modules/bs_kick.so
anope/modules/bs_set.so
anope/modules/chanserv.so
anope/modules/chanstats.so
anope/modules/cs_access.so
anope/modules/cs_akick.so
anope/modules/cs_ban.so
anope/modules/cs_clone.so
anope/modules/cs_drop.so
anope/modules/cs_enforce.so
anope/modules/cs_entrymsg.so
anope/modules/cs_fantasy_stats.so
anope/modules/cs_fantasy_top.so
anope/modules/cs_flags.so
anope/modules/cs_getkey.so
anope/modules/cs_info.so
anope/modules/cs_invite.so
anope/modules/cs_kick.so
anope/modules/cs_list.so
anope/modules/cs_log.so
anope/modules/cs_mode.so
anope/modules/cs_register.so
anope/modules/cs_seen.so
anope/modules/cs_set.so
anope/modules/cs_set_misc.so
anope/modules/cs_status.so
anope/modules/cs_statusupdate.so
anope/modules/cs_suspend.so
anope/modules/cs_sync.so
anope/modules/cs_topic.so
anope/modules/cs_unban.so
anope/modules/cs_updown.so
anope/modules/cs_xop.so
anope/modules/db_atheme.so
anope/modules/db_flatfile.so
anope/modules/db_json.so
anope/modules/db_old.so
anope/modules/db_redis.so
anope/modules/db_sql.so
anope/modules/db_sql_live.so
anope/modules/dns.so
anope/modules/dnsbl.so
%%ENC_ARGON%%anope/modules/enc_argon2.so
%%ENC_POSIX%%anope/modules/enc_posix.so
anope/modules/enc_bcrypt.so
anope/modules/enc_md5.so
anope/modules/enc_none.so
anope/modules/enc_old.so
anope/modules/enc_sha1.so
anope/modules/enc_sha2.so
anope/modules/enc_sha256.so
anope/modules/fantasy.so
anope/modules/gl_global.so
anope/modules/gl_queue.so
anope/modules/gl_server.so
anope/modules/global.so
anope/modules/greet.so
anope/modules/help.so
anope/modules/helpchan.so
anope/modules/hostserv.so
anope/modules/hs_del.so
anope/modules/hs_group.so
anope/modules/hs_list.so
anope/modules/hs_off.so
anope/modules/hs_on.so
anope/modules/hs_request.so
anope/modules/hs_set.so
anope/modules/httpd.so
anope/modules/hybrid.so
anope/modules/inspircd.so
anope/modules/jsonrpc.so
%%LDAP%%anope/modules/ldap.so
%%LDAP%%anope/modules/ldap_authentication.so
%%LDAP%%anope/modules/ldap_oper.so
anope/modules/memoserv.so
anope/modules/ms_cancel.so
anope/modules/ms_check.so
anope/modules/ms_del.so
anope/modules/ms_ignore.so
anope/modules/ms_info.so
anope/modules/ms_list.so
anope/modules/ms_read.so
anope/modules/ms_rsend.so
anope/modules/ms_send.so
anope/modules/ms_sendall.so
anope/modules/ms_set.so
anope/modules/ms_staff.so
%%MYSQL%%anope/modules/mysql.so
anope/modules/ngircd.so
anope/modules/nickserv.so
anope/modules/ns_ajoin.so
anope/modules/ns_alist.so
anope/modules/ns_cert.so
anope/modules/ns_confirm.so
anope/modules/ns_drop.so
anope/modules/ns_email.so
anope/modules/ns_group.so
anope/modules/ns_identify.so
anope/modules/ns_info.so
anope/modules/ns_list.so
anope/modules/ns_logout.so
anope/modules/ns_recover.so
anope/modules/ns_register.so
anope/modules/ns_resetpass.so
anope/modules/ns_sasl.so
anope/modules/ns_set.so
anope/modules/ns_set_keepmodes.so
anope/modules/ns_set_language.so
anope/modules/ns_set_message.so
anope/modules/ns_set_misc.so
anope/modules/ns_set_protect.so
anope/modules/ns_suspend.so
anope/modules/ns_update.so
anope/modules/operserv.so
anope/modules/os_akill.so
anope/modules/os_chankill.so
anope/modules/os_config.so
anope/modules/os_defcon.so
anope/modules/os_dns.so
anope/modules/os_forbid.so
anope/modules/os_ignore.so
anope/modules/os_info.so
anope/modules/os_jupe.so
anope/modules/os_kick.so
anope/modules/os_kill.so
anope/modules/os_list.so
anope/modules/os_login.so
anope/modules/os_logsearch.so
anope/modules/os_mode.so
anope/modules/os_modinfo.so
anope/modules/os_module.so
anope/modules/os_news.so
anope/modules/os_noop.so
anope/modules/os_oper.so
anope/modules/os_reload.so
anope/modules/os_session.so
anope/modules/os_set.so
anope/modules/os_shutdown.so
anope/modules/os_stats.so
anope/modules/os_svs.so
anope/modules/os_sxline.so
anope/modules/os_update.so
anope/modules/plexus.so
anope/modules/proxyscan.so
anope/modules/ratbox.so
%%REDIS%%anope/modules/redis.so
%%PCRE2%%anope/modules/regex_pcre2.so
%%POSIX%%anope/modules/regex_posix.so
anope/modules/regex_stdlib.so
%%TRE%%anope/modules/regex_tre.so
anope/modules/rewrite.so
anope/modules/rpc_data.so
anope/modules/rpc_user.so
anope/modules/rpc_message.so
anope/modules/rpc_system.so
anope/modules/solanum.so
anope/modules/sql_authentication.so
anope/modules/sql_log.so
anope/modules/sql_oper.so
%%SQLITE%%anope/modules/sqlite.so
%%GNUTLS%%anope/modules/ssl_gnutls.so
%%OPENSSL%%anope/modules/ssl_openssl.so
anope/modules/unrealircd.so
anope/modules/webcpanel.so
%%XMLRPC%%anope/modules/xmlrpc.so
@dir(nobody,,) anope/data/backups
@dir(nobody,,) anope/data
@dir(nobody,,) anope/logs