Hello, Currently Parabola (indirectly) packages/carries at least three different IRC daemons/servers, yet not a single IRC services program.
Other than the original IRC services authored by Andrew Church (which has long been unmaintained), there are Atheme and Anope. I initially wanted to try to package Atheme, but the licensing there was unclear. Anope seems to have clearer GPL-2.0 only licensing: https://github.com/anope/anope/blob/master/docs/COPYING https://raw.githubusercontent.com/anope/anope/master/docs/COPYING I've attached a patch based upon the version in the AUR, with license clarification and added target for armv7h. I hope it can be packaged as no other alternatives currently exists in the repos which would push people to manually download and install or potentially use some non-free alternative. -- Kind Regards, Wael Karram.
From 5779ce39bf10ada46e3131eb9f2f681d77314fe9 Mon Sep 17 00:00:00 2001 From: wael <[email protected]> Date: Tue, 3 Jan 2023 12:35:29 +0200 Subject: [PATCH] Packaged anope to provide IRC services. --- pcr/anope/.SRCINFO | 26 +++++++++++ pcr/anope/PKGBUILD | 99 ++++++++++++++++++++++++++++++++++++++++ pcr/anope/anope.install | 23 ++++++++++ pcr/anope/anope.service | 17 +++++++ pcr/anope/anope.tmpfiles | 1 + 5 files changed, 166 insertions(+) create mode 100644 pcr/anope/.SRCINFO create mode 100644 pcr/anope/PKGBUILD create mode 100644 pcr/anope/anope.install create mode 100644 pcr/anope/anope.service create mode 100644 pcr/anope/anope.tmpfiles diff --git a/pcr/anope/.SRCINFO b/pcr/anope/.SRCINFO new file mode 100644 index 0000000000..39545c70da --- /dev/null +++ b/pcr/anope/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = anope + pkgdesc = A set of IRC Services designed for flexibility and ease of use + pkgver = 2.0.12 + pkgrel = 1 + url = https://www.anope.org/ + install = anope.install + arch = i686 + arch = x86_64 + license = GPL + makedepends = cmake + optdepends = openldap: OpenLDAP backend support + optdepends = mariadb: MySQL database backend support + optdepends = sqlite: SQLite database backend support + optdepends = openssl: OpenSSL support + optdepends = gnutls: GnuTLS support + optdepends = pcre: Perl-compatible regular expression support + source = https://github.com/anope/anope/archive/2.0.12.tar.gz + source = anope.install + source = anope.service + source = anope.tmpfiles + sha256sums = eeba1331eaa02a0b05347209604e22df8052d9b10fd19a7633ad1e837f003ff0 + sha256sums = 310487f9962d9c6f5b968453b7954be40b1c4bf8f591d8ac550e36e6eb80d846 + sha256sums = 93d656d74d1ab405e1484eb625c7e45843cc2915c492d0c76da890ff55c06ce0 + sha256sums = c0e4605b6e92b93f40d3f33a9fe39777c5bc8a0863a3b07c282f7331f5bacc53 + +pkgname = anope diff --git a/pcr/anope/PKGBUILD b/pcr/anope/PKGBUILD new file mode 100644 index 0000000000..df67f20642 --- /dev/null +++ b/pcr/anope/PKGBUILD @@ -0,0 +1,99 @@ +# Maintainer (AUR): Steven Cook <[email protected]> +# Contributor (AUR): Adam Eberlin <[email protected]> +# Maintainer (Parabola): Wael Karram <[email protected]> + +# Parabola changes and rationale: +# Clarify licensing and add armv7h target + +pkgname=anope +pkgver=2.0.12 +pkgrel=1 +pkgdesc="A set of IRC Services designed for flexibility and ease of use" +arch=('i686' 'x86_64') +arch+=('armv7h') +url="https://www.anope.org/" +license=('GPL2') +makedepends=('cmake') +optdepends=( + 'openldap: OpenLDAP backend support' + 'mariadb: MySQL database backend support' + 'sqlite: SQLite database backend support' + 'openssl: OpenSSL support' + 'gnutls: GnuTLS support' + 'pcre: Perl-compatible regular expression support' +) +install="anope.install" +source=( + "https://github.com/${pkgname}/${pkgname}/archive/${pkgver}.tar.gz" + "anope.install" + "anope.service" + "anope.tmpfiles" +) +sha256sums=( + 'eeba1331eaa02a0b05347209604e22df8052d9b10fd19a7633ad1e837f003ff0' + '310487f9962d9c6f5b968453b7954be40b1c4bf8f591d8ac550e36e6eb80d846' + '93d656d74d1ab405e1484eb625c7e45843cc2915c492d0c76da890ff55c06ce0' + 'c0e4605b6e92b93f40d3f33a9fe39777c5bc8a0863a3b07c282f7331f5bacc53' +) + +prepare() { + echo "If you want to enable any extra modules before building Anope," + echo "please run the 'extras' script in the ${srcdir} directory." +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # Create a non-interactive config + cat << EOF > config.cache +INSTDIR="${srcdir}/install" +RUNGROUP="anope" +UMASK=077 +DEBUG="no" +USE_RUN_CC_PL="no" +USE_PCH="no" +EXTRA_INCLUDE_DIRS="" +EXTRA_LIB_DIRS="" +EXTRA_CONFIG_ARGS="" +EOF + + ./Config -nointro -quick + cd build && make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}/build" + + make install + + cd "${srcdir}/install" + + # Create directories + install -Dd "${pkgdir}"{/var/log,/var/lib,/etc,/usr/lib}/${pkgname} + install -Dd "${pkgdir}/var/lib/${pkgname}/runtime" + install -Dd "${pkgdir}/usr/bin" + install -Dd "${pkgdir}/usr/lib/${pkgname}"/{modules,locale} + + # Copy files + + # We don't need to copy anoperc or example.chk, since systemd + # takes care of all of that now. + + # Executable files + install -Dm755 bin/{anopesmtp,services} "${pkgdir}/usr/bin" + + # Configuration files + install -Dm644 conf/*.conf "${pkgdir}/etc/${pkgname}" + + # Loadable modules + install -Dm644 lib/modules/* "${pkgdir}/usr/lib/${pkgname}/modules" + + # Systemd service file + install -Dm644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service" + + # tmpfiles config + install -Dm644 "${srcdir}/${pkgname}.tmpfiles" "${pkgdir}/etc/tmpfiles.d/${pkgname}.conf" + + cp -r data/* "${pkgdir}/var/lib/${pkgname}" + cp -r locale/* "${pkgdir}/usr/lib/${pkgname}/locale" +} diff --git a/pcr/anope/anope.install b/pcr/anope/anope.install new file mode 100644 index 0000000000..1ff73f372f --- /dev/null +++ b/pcr/anope/anope.install @@ -0,0 +1,23 @@ +post_install() { + # Add anope user and group if they don't exist + getent group anope &>/dev/null || groupadd -r anope >/dev/null + getent passwd anope &>/dev/null || useradd -r -g anope -d /var/lib/anope -s /bin/false -c anope anope >/dev/null + + # Make sure log directory is writable by the anope user + chown anope:anope /var/log/anope + + echo "To configure anope, copy /etc/anope/example.conf to" + echo "/etc/anope/services.conf and edit it to your liking." + echo + echo "The systemd service uses a value of /run/anope/anope.pid" + echo "by default. When editing your services.conf file, be" + echo "sure to set the location of the PID file to this value." +} + +post_remove() { + # Delete the anope user and group + # This might fail if anope is running. Need to check this. + getent passwd anope &>/dev/null && userdel anope >/dev/null + getent group anope &>/dev/null && groupdel anope >/dev/null +} + diff --git a/pcr/anope/anope.service b/pcr/anope/anope.service new file mode 100644 index 0000000000..5db05f1c1e --- /dev/null +++ b/pcr/anope/anope.service @@ -0,0 +1,17 @@ +[Unit] +Description=A set of IRC Services designed for flexibility and ease of use +Requires=network.target +After=network.target + +[Service] +Type=simple +PIDFile=/run/anope/anope.pid +ExecStart=/usr/bin/services --confdir=/etc/anope --dbdir=/var/lib/anope --localedir=/usr/lib/anope/locale --logdir=/var/log/anope --modulesdir=/usr/lib/anope --nofork +ExecReload=/bin/kill -1 $MAINPID +Restart=always +User=anope +Group=anope + +[Install] +WantedBy=multi-user.target + diff --git a/pcr/anope/anope.tmpfiles b/pcr/anope/anope.tmpfiles new file mode 100644 index 0000000000..826121efba --- /dev/null +++ b/pcr/anope/anope.tmpfiles @@ -0,0 +1 @@ +D /run/anope 0755 anope anope -- 2.39.0
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Dev mailing list [email protected] https://lists.parabola.nu/mailman/listinfo/dev
