Files
extra/unrealircd/PKGBUILD
2025-06-22 20:39:04 -05:00

73 lines
2.5 KiB
Bash

# 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
}