summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James (sam_c) <sam@cmpct.info>2020-03-30 17:46:48 +0100
committerThomas Deutschmann <whissi@gentoo.org>2020-04-11 23:30:32 +0200
commita4a6b4f66ff1ec0a39e687929bdbf47c03a0e637 (patch)
treecb763da0a701cbe79908cea59624233d2ae6c1d6 /net-irc
parentacct-group/anope: Add new group for net-irc/anope (diff)
downloadgentoo-a4a6b4f66ff1ec0a39e687929bdbf47c03a0e637.tar.gz
gentoo-a4a6b4f66ff1ec0a39e687929bdbf47c03a0e637.tar.bz2
gentoo-a4a6b4f66ff1ec0a39e687929bdbf47c03a0e637.zip
net-irc/anope: Bump to 2.0.7, GLEP 81
* Bumps version to GLEP 81 * Converts to GLEP 81 * Become proxy-maintainer Signed-off-by: Sam James (sam_c) <sam@cmpct.info> Closes: https://github.com/gentoo/gentoo/pull/15253 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'net-irc')
-rw-r--r--net-irc/anope/Manifest1
-rw-r--r--net-irc/anope/anope-2.0.7.ebuild155
-rw-r--r--net-irc/anope/files/anope-conf.d-v24
-rw-r--r--net-irc/anope/files/example.conf-user.patch13
-rw-r--r--net-irc/anope/metadata.xml25
5 files changed, 191 insertions, 7 deletions
diff --git a/net-irc/anope/Manifest b/net-irc/anope/Manifest
index fb1c759751ec..38d65bf722f3 100644
--- a/net-irc/anope/Manifest
+++ b/net-irc/anope/Manifest
@@ -1 +1,2 @@
DIST anope-2.0.6-source.tar.gz 1792912 BLAKE2B 00c70723c887821d2dda065f9fdb4c4fc79a1534217dd567c2247c3ae9d0b3c1c07a9e1e9d87bfdf5f7f9be212af5139e29710224e02e80154290dd6d4b5ee7c SHA512 c100758d6159023832bc7a4dceb7d554a9b3cd9120b033efc9a93c7ff28e76a086d0594b66b9cd2946b231421217674990f2a3ebaa8a6598c2a25e2dafd1b65b
+DIST anope-2.0.7-source.tar.gz 1817484 BLAKE2B 13a4628db8cb885d4636ab1897aab322f7846740e4a3fccd02a417d84a8eb3c942aebf5e0a51f8ca1108f455b44b4e280e7386b42e03f640c9b0e68943252814 SHA512 22a9f3e0d9fe7f68304062829a19b693a3414f94c90f8da601ab98995cbff7310dc22ca40749d50d6722dfb4649817d2f4b1dbe4afa3254b28980f03a491de65
diff --git a/net-irc/anope/anope-2.0.7.ebuild b/net-irc/anope/anope-2.0.7.ebuild
new file mode 100644
index 000000000000..7761a88223ae
--- /dev/null
+++ b/net-irc/anope/anope-2.0.7.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Anope IRC Services"
+HOMEPAGE="https://anope.org/ https://github.com/anope/anope/"
+SRC_URI="https://github.com/anope/anope/releases/download/${PV}/${P}-source.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gnutls ldap mysql pcre sql sqlite ssl tre"
+REQUIRED_USE="
+ sql? ( || ( mysql sqlite ) )
+"
+
+BDEPEND="sys-devel/gettext"
+DEPEND="
+ acct-group/anope
+ acct-user/anope
+ mysql? ( dev-db/mysql-connector-c:0= )
+ ssl? ( dev-libs/openssl:0= )
+ gnutls? ( net-libs/gnutls:0= dev-libs/libgcrypt:0= )
+ ldap? ( net-nds/openldap )
+ pcre? ( dev-libs/libpcre )
+ sqlite? ( dev-db/sqlite:3 )
+ tre? ( dev-libs/tre )
+ virtual/libintl
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/pid-patch.patch"
+ "${FILESDIR}/example.conf-user.patch"
+)
+
+S="${WORKDIR}/${P}-source"
+
+src_prepare() {
+ anope_enable_mod() {
+ local modulefile=${1}
+ ln -s "extra/${modulefile}" "modules/" || \
+ die "Failed to use ${modulefile}"
+ }
+
+ # These all require MySQL specifically
+ if use mysql ; then
+ anope_enable_mod "m_mysql.cpp"
+ anope_enable_mod "stats/irc2sql/irc2sql.cpp"
+ anope_enable_mod "stats/irc2sql/irc2sql.h"
+ anope_enable_mod "stats/irc2sql/tables.cpp"
+ anope_enable_mod "stats/irc2sql/utils.cpp"
+ anope_enable_mod "stats/m_chanstats.cpp"
+ anope_enable_mod "stats/cs_fantasy_top.cpp"
+ anope_enable_mod "stats/cs_fantasy_stats.cpp"
+ anope_enable_mod "m_sql_log.cpp"
+ anope_enable_mod "m_sql_oper.cpp"
+ fi
+
+ use sqlite && anope_enable_mod "m_sqlite.cpp"
+
+ # Any SQL implementation
+ if use sql ; then
+ anope_enable_mod "m_sql_authentication.cpp"
+ anope_enable_mod "m_sql.cpp"
+ anope_enable_mod "m_sql_live.cpp"
+ fi
+
+ if use ldap ; then
+ anope_enable_mod "m_ldap.cpp"
+ anope_enable_mod "m_ldap_authentication.cpp"
+ anope_enable_mod "m_ldap_oper.cpp"
+ fi
+
+ use gnutls && anope_enable_mod "m_ssl_gnutls.cpp"
+ use pcre && anope_enable_mod "m_regex_pcre.cpp"
+ use ssl && anope_enable_mod "m_ssl_openssl.cpp"
+ use tre && anope_enable_mod "m_regex_tre.cpp"
+
+ # Unconditional modules
+ anope_enable_mod "m_regex_posix.cpp"
+
+ # Avoid a silly sandbox error - tries to delete /usr/lib/modules
+ sed -i '/install.*REMOVE_RECURSE.*/d' CMakeLists.txt || die
+
+ # Copy anope.conf for fixup to comply w/ prefix
+ cp "${FILESDIR}/anope-conf.d-v2" "${T}" || die
+
+ # Look in the right place for modules
+ sed -i "s~%LIBDIR%~${EPREFIX}/usr/$(get_libdir)/anope/~" \
+ "${T}/anope-conf.d-v2" || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBIN_DIR="libexec/anope"
+ -DDB_DIR="../var/lib/anope"
+ -DDOC_DIR="share/doc/${PF}"
+ -DLIB_DIR="$(get_libdir)/anope"
+ -DLOCALE_DIR="share/locale"
+ -DCONF_DIR="/etc/anope"
+ -DLOGS_DIR="../var/log/anope/"
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ newinitd "${FILESDIR}/anope-init.d" "${PN}"
+ newconfd "${T}/anope-conf.d-v2" "${PN}"
+
+ dosym ../libexec/anope/services /usr/bin/services
+ dosym ../libexec/anope/anopesmtp /usr/bin/anopesmtp
+
+ keepdir /var/log/anope /var/lib/anope/backups
+ fowners anope:anope /var/{lib,log}/anope /var/lib/anope/backups
+
+ dodoc -r docs/* data/example.conf
+
+ insinto /etc/anope
+ newins data/example.conf services.conf
+
+ fowners anope:anope /var/log/anope
+ fowners anope:anope /var/lib/anope/backups/
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ # Only tell them about this on a fresh install.
+ elog
+ ewarn "Anope won't run out of the box, you still have to configure it to match your IRCd's configuration."
+ ewarn "Edit /etc/anope/services.conf to configure Anope."
+ elog
+ else
+ # We're replacing some versions. Find out which.
+ local ver
+ for ver in ${REPLACING_VERSIONS} ; do
+ if ver_test ${ver} -lt 2.0.7 ; then
+ # In this version, we introduced correct FHS structure
+ # We need the users to make some changes to their services.conf
+ ewarn "Please modify your services.conf to include the following directive:"
+ ewarn "in options{}, please include user=\"anope\" and group=\"anope\""
+ ewarn "This is needed because Anope now starts as root and drops down."
+ ewarn "Reference: https://wiki.anope.org/index.php/2.0/Configuration#Services_Process_Options"
+ fi
+ done
+ fi
+}
diff --git a/net-irc/anope/files/anope-conf.d-v2 b/net-irc/anope/files/anope-conf.d-v2
index fbe7c3c5017a..0eeabdbbb685 100644
--- a/net-irc/anope/files/anope-conf.d-v2
+++ b/net-irc/anope/files/anope-conf.d-v2
@@ -1,7 +1,7 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# user to run ultimate-ircd as
+# user to run anope as
ANOPE_USER="anope"
# Additional commandline parameters
diff --git a/net-irc/anope/files/example.conf-user.patch b/net-irc/anope/files/example.conf-user.patch
new file mode 100644
index 000000000000..7f7a3826cb10
--- /dev/null
+++ b/net-irc/anope/files/example.conf-user.patch
@@ -0,0 +1,13 @@
+--- a/data/example.conf
++++ b/data/example.conf
+@@ -375,8 +375,8 @@
+ * On Linux/UNIX systems Anope can setuid and setgid to this user and group
+ * after starting up. This is useful if Anope has to bind to privileged ports
+ */
+- #user = "anope"
+- #group = "anope"
++ user = "anope"
++ group = "anope"
+
+ /*
+ * The case mapping used by services. This must be set to a valid locale name
diff --git a/net-irc/anope/metadata.xml b/net-irc/anope/metadata.xml
index ddb7e3c5b209..0ca16f3bed07 100644
--- a/net-irc/anope/metadata.xml
+++ b/net-irc/anope/metadata.xml
@@ -1,16 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!--maintainer-needed-->
- <longdescription>Anope IRC Services</longdescription>
+ <maintainer type="person">
+ <email>sam@cmpct.info</email>
+ <name>Sam James</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ Anope IRC Services provide user and channel management services for an
+ IRC server. It is a well-known package which continues to be actively
+ developed. It has support for multiple different IRCd linking protocols.
+ </longdescription>
<upstream>
<remote-id type="sourceforge">anope</remote-id>
<remote-id type="github">anope/anope</remote-id>
</upstream>
<use>
+ <flag name="ldap">Build LDAP modules for e.g. opertypes</flag>
+ <flag name="ssl">Provide SSL services using OpenSSL</flag>
+ <flag name="sql">Build modules which require SQL</flag>
+ <flag name="tre">Use <pkg>dev-libs/tre</pkg> for regular expressions</flag>
+
+ <!-- pre 2.0.7 USE flags; deprecated -->
<flag name="chanstats">Channel Statistics</flag>
<flag name="cs-fantasy-stats">Enables the STATS and GSTATS commands</flag>
- <flag name="cs-fantasy-top">Enables the (G)TOP and (G)TOP10 commands</flag>
+ <flag name="cs-fantasy-top">Enables the (G)TOP and (G)TOP10 commands</flag>
<flag name="irc2sql">Stores channel statistics in a mysql database</flag>
<flag name="ldap-auth">Authorize through LDAP</flag>
<flag name="ldap-oper">Dynamically ties users to Anope opertypes via LDAP</flag>
@@ -18,7 +35,5 @@
<flag name="sql-auth">Authorize through SQL</flag>
<flag name="sql-log">Additional log target in SQL</flag>
<flag name="sql-oper">Allows granting users services operator privileges from SQL</flag>
- <flag name="ssl">Provide SSL services using OpenSSL</flag>
- <flag name="tre">Use <pkg>dev-libs/tre</pkg> for regular expressions</flag>
</use>
</pkgmetadata>