Name: unrealircd
Version: 3.2.8
Release: 1%{?dist}
Summary: UnrealIRCd is an IRC server.
Group: Applications/Internet
License: GPL
URL:
http://www.unrealircd.com/
Source0:
http://www.unrealircd.com/downloads/Unreal3.2.8.tar.gz
Source1: unrealircd.init
Source2: unrealircd.conf
BuildRoot: %{_tmppath}/unrealircd-%{version}-%{release}-root
#BuildArch: noarch
BuildRequires: zlib-devel openssl-devel
Requires: openssl zlib
Patch: %{name}-%{version}_conf.patch
%description
UnrealIRCd is an advanced IRC server that provides features for just
about everything.
%prep
%setup -q -n Unreal3.2
%patch -p1 -b conf.rej
%build
%configure --enable-nospoof \
--enable-prefixaq \
--enable-hub \
--enable-ziplinks \
--enable-inet6 \
--with-listen=5 \
--with-nick-history=2000 \
--with-sendq=3000000 \
--with-bufferpool=18 \
--with-hostname=localhost \
--with-permissions=0600 \
--with-dpath=%{_sysconfdir}/unrealircd \
--with-fd-setsize=1024 \
--with-spath=%{_sbindir}/unrealircd \
--enable-dynamic-linking \
--enable-ssl
%{__make}
%install
%{__rm} -fr %{buildroot}
# Buggy make install. Do it here instead.
# Create directories.
%{__install} -m 0770 -d %{buildroot}%{_sysconfdir}/unrealircd
%{__install} -m 0750 -d %{buildroot}%{_sysconfdir}/unrealircd/{networks,aliases}
%{__install} -d %{buildroot}%{_sbindir}
%{__install} -d %{buildroot}%{_libdir}/unrealircd
%{__install} -d %{buildroot}%{_initrddir}
# Install the ircd.
%{__install} -m 0710 src/ircd %{buildroot}%{_sbindir}/unrealircd
# Install the modules.
%{__ln_s} %{_libdir}/unrealircd %{buildroot}%{_sysconfdir}/unrealircd/modules
%{__install} -m 0750 src/modules/*.so %{buildroot}%{_libdir}/unrealircd
# Install configuration files.
%{__install} -m 0640 doc/example.conf %{buildroot}%{_sysconfdir}/unrealircd/unrealircd.conf
# Template network file.
%{__install} -m 0640 networks/template.network %{buildroot}%{_sysconfdir}/unrealircd/networks
# Network generator.
%{__install} -m 0710 networks/makenet %{buildroot}%{_sysconfdir}/unrealircd/networks
# Aliases configuration.
%{__install} -m 0640 aliases/*.conf %{buildroot}%{_sysconfdir}/unrealircd/aliases
# Bad word filtering.
%{__install} -m 0640 badwords.*.conf %{buildroot}%{_sysconfdir}/unrealircd
# Spam filtering.
%{__install} -m 0640 spamfilter.conf %{buildroot}%{_sysconfdir}/unrealircd
# Help stuff.
%{__install} -m 0640 help.conf %{buildroot}%{_sysconfdir}/unrealircd/help.conf
# Create motd and rules
touch %{buildroot}%{_sysconfdir}/unrealircd/ircd.motd.fr
touch %{buildroot}%{_sysconfdir}/unrealircd/ircd.rules.fr
# Install init.d script
%{__install} -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/unrealircd
# Make pid file a symlink into %{_localstatedir}/run/unrealircd.pid
%{__ln_s} %{_localstatedir}/run/unrealircd.pid %{buildroot}%{_sysconfdir}/unrealircd/unrealircd.pid
%pre
%{_sbindir}/groupadd %{name} &>/dev/null || :
%{_sbindir}/useradd -r -g %{name} -s /bin/false -d %{_sysconfdir}/unrealircd -c 'IRC server' %{name} &>/dev/null || :
%post
# SSL generator
if [ ! -f %{_sysconfdir}/unrealircd/server.key ]; then
%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/unrealircd/server.key 2> /dev/null
fi
FQDN=`hostname`
if [ "x${FQDN}" = "x" ]; then
FQDN=localhost.localdomain
fi
if [ ! -f %{_sysconfdir}/unrealircd/server.crt ]; then
cat << EOF | %{_bindir}/openssl req -new -key %{_sysconfdir}/unrealircd/server.key -x509 -days 365 -out %{_sysconfdir}/unrealircd/server.crt 2>/dev/null
--
SomeState
SomeCity
SomeOrganization
SomeOrganizationalUnit
${FQDN}
root@${FQDN}
EOF
fi
# Install init.d script
/sbin/chkconfig --add unrealircd
%preun
/sbin/service unrealircd stop >/dev/null 2>&1 || true
/sbin/chkconfig --del unrealircd >/dev/null 2>&1 || true
%files
%defattr(-,root,unrealircd,774)
# Documentation.
%doc doc/Authors doc/example.*.conf doc/help.*.conf doc/tao.of.irc doc/unreal32docs.html Donation
%{_sbindir}/unrealircd
%dir %{_libdir}/unrealircd
%{_libdir}/unrealircd/*.so
%dir %{_sysconfdir}/unrealircd
%config(noreplace) %{_sysconfdir}/unrealircd/*
%{_initrddir}/unrealircd
%changelog
* Wed Apr 08 2009 Sébastien Andreayya <
crupuk@gmail.com> 3.2.8-1
- Update to 3.2.8
- Add SSL Support
* Fri Mar 25 2005 Daniel Hokka Zakrisson <
daniel@hozac.com> 3.2.3-1
- Update to 3.2.3
* Mon Nov 01 2004 Daniel Hokka Zakrisson <
daniel@hozac.com> 3.2.2-1
- Update to 3.2.2
* Sat Jul 17 2004 Daniel Hokka Zakrisson <
daniel@hozac.com> 3.2.1-1
- Update to 3.2.1
* Wed Jun 02 2004 Daniel Hokka Zakrisson <
daniel@hozac.com> 3.2-1
- Update to 3.2
* Tue Feb 24 2004 Daniel Hokka Zakrisson <
daniel@hozac.com> 3.2-0.rc1.3
- Don't care if adding user/group fails.
* Sat Feb 21 2004 Daniel Hokka Zakrisson <
daniel@hozac.com> 3.2-0.rc1.2
- Fix init.d script.
* Sun Feb 15 2004 Daniel Hokka Zakrisson <
daniel@hozac.com> 3.2-0.rc1.1
- Initial build.