initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

72
unrealircd/PKGBUILD Normal file
View File

@@ -0,0 +1,72 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
pkgname=unrealircd
pkgver=6.1.10
pkgrel=1
pkgdesc="Free and libre IRC Server"
arch=('i686' 'x86_64')
url="https://www.unrealircd.org"
license=('GPL-2')
depends=('libressl' 'curl' 'c-ares' 'tre' 'pcre2' 'libnsl' 'argon2')
conflicts=('ircd')
provides=('ircd')
backup=('etc/unrealircd/unrealircd.conf')
install=unrealircd.install
source=("https://www.unrealircd.org/unrealircd4/unrealircd-$pkgver.tar.gz"{,.asc}
"unrealircd.initd"
"unrealircd.run")
sha512sums=('86aef198766682fb28dc42e359700a9e55549e256f29407ed192cbcf5727b234a0e086f2c614d9efc9613c674acc6455733aa6442833e8853b5b9d36e761b163'
'SKIP'
'd0bfec260d78330a2d723f63177782b7fb3061008f1af7969842491ed955478492b1691c78d9952aba0abe30c351ccb3ebee0946e75193c60e187e332ca1811c'
'a87b14b148ebce28de91e78c15977af2f1752d201056fd0f2d8e60c7503c6c80e6382fa0e32e62b89d2a5b8ab0a0c122d4a0d05f36e35ca8e08205b8225531fe')
validpgpkeys=('1D2D2B03A0B68ED11D68A24BA7A21B0A108FF4A9') # UnrealIRCd releases <releases@unrealircd.org>
prepare() {
cd "$srcdir"/unrealircd-$pkgver
sed -i \
-e 's|$(INSTALL) -m 0700|$(INSTALL) -m 0755|g' \
-e 's|$(INSTALL) -m 0600|$(INSTALL) -m 0644|g' \
Makefile.in
}
build() {
cd "$srcdir"/unrealircd-$pkgver
./configure \
--with-pidfile=/run/unrealircd/ircd.pid \
--enable-ssl=/usr \
--with-bindir=/usr/bin \
--with-datadir=/var/lib/unrealircd \
--with-confdir=/etc/unrealircd \
--with-modulesdir=/usr/lib/unrealircd \
--with-logdir=/var/log/unrealircd \
--with-cachedir=/var/cache/unrealircd \
--with-docdir=/usr/share/doc/unrealircd \
--with-tmpdir=/tmp \
--with-scriptdir=/usr \
--with-nick-history=2000 \
--with-permissions=0644 \
--enable-dynamic-linking
make
}
package() {
cd "$srcdir"/unrealircd-$pkgver
export pkgdir
make install DESTDIR="$pkgdir"
mv "$pkgdir"/usr/unrealircd "$pkgdir"/etc/unrealircd/unrealircd
cp "$pkgdir"/etc/unrealircd/examples/example.conf "$pkgdir"/etc/unrealircd/unrealircd.conf
rm -rf "$pkgdir"/tmp
rm -rf "$pkgdir"/usr/source
sed -i -e 's/loadmodule "geoip_classic"\;/\/\/loadmodule "geoip_classic"\;/g' "$pkgdir"/etc/unrealircd/modules.default.conf
# directories
install -d -m750 "$pkgdir"/var/cache/$pkgname
# services
install -Dm0755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -Dm0755 "$srcdir/$pkgname.run" "$pkgdir/etc/sv/$pkgname/run"
# license
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}

View File

@@ -0,0 +1,16 @@
#!/sbin/openrc-run
pidfile="/run/${RC_SVCNAME}.pid"
command="/usr/bin/unrealircd"
command_background=true
command_user="ircd:ircd"
depend() {
after net nss
use dns logger
provide ircd
}
start_pre() {
checkpath -d /var/log/unrealircd
}

View File

@@ -0,0 +1,28 @@
post_install() {
# create group
if ! getent group ircd &>/dev/null; then
groupadd -r ircd >/dev/null
fi
# create user
if ! getent passwd ircd &>/dev/null; then
useradd -r ircd -d /var/empty -g ircd -s /bin/nologin >/dev/null
fi
# show message
echo "SSL is enabled by default, so you need to create pem files"
echo "unrealircd.conf needs adjustments"
echo "See also: https://www.unrealircd.org/docs/Main_Page"
}
post_upgrade() {
post_install
}
post_remove() {
if getent passwd ircd &>/dev/null; then
userdel ircd >/dev/null
fi
if getent group ircd &>/dev/null; then
groupdel ircd >/dev/null
fi
}

View File

@@ -0,0 +1,3 @@
#!/bin/sh
exec chpst -u ircd unrealircd -F