+#
+# Conditional build
+%bcond_with smode # build with /smode command support
+#
Summary: Internet Relay Chat Server
Summary(pl): Serwer IRC (Internet Relay Chat)
Name: bircd
Version: 2.0.3rc6
-Release: 0.1
+Release: 3
License: GPL
Group: Daemons
Source0: http://www.onthanet.nl/~borg/download/%{name}%{version}.tgz
Patch0: %{name}-makefile.patch
Patch1: %{name}-config.patch
Patch2: %{name}-fix.patch
+Patch3: %{name}-smode.patch
URL: http://www.onthanet.nl/~borg/
+BuildRequires: rpmbuild(macros) >= 1.159
PreReq: rc-scripts
Requires(pre): /usr/bin/getgid
Requires(pre): /bin/id
Requires(pre): /usr/sbin/useradd
Requires(post): fileutils
Requires(post,preun): /sbin/chkconfig
-Requires(postun): /usr/sbin/userdel
Requires(postun): /usr/sbin/groupdel
+Requires(postun): /usr/sbin/userdel
+Provides: group(ircd)
+Provides: user(ircd)
+Obsoletes: ircd
+Obsoletes: ircd6
+Obsoletes: ircd-hybrid
+Obsoletes: ircd-ptlink
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Conflicts: ircd
-Conflicts: ircd-hybrid
%define _sysconfdir /etc/ircd
%define _localstatedir /var/lib/ircd
bIRCd is a small, simple and very fast IRC server. It is easy to
configure and use. It also has support for IPv6.
-
%description -l pl
bIRCd jest ma³ym, prostym i bardzo szybkim serwerem IRC. Jest bardzo
prosty w konfiguracji i u¿ytkowaniu. Posiada równie¿ wsparcie dla
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%{?with_smode:%patch3 -p1}
%build
./Config
exit 1
fi
else
- %{_sbindir}/groupadd -f -g 75 ircd 2> /dev/null
+ /usr/sbin/groupadd -f -g 75 ircd 2> /dev/null
fi
if [ -n "`id -u ircd 2>/dev/null`" ]; then
if [ "`id -u ircd`" != "75" ]; then
exit 1
fi
else
- %{_sbindir}/useradd -g ircd -d /etc/ircd -u 75 -s /bin/true -c "IRC Service account" ircd 2> /dev/null
+ /usr/sbin/useradd -g ircd -d /etc/ircd -u 75 -s /bin/true -c "IRC Service account" ircd 2> /dev/null
fi
%post
fi
%postun
-# If package is being erased for the last time.
if [ "$1" = "0" ]; then
- %{_sbindir}/userdel ircd 2> /dev/null
- %{_sbindir}/groupdel ircd 2> /dev/null
+ %userremove ircd
+ %groupremove ircd
fi
%files