+#
+# Conditional build
+%bcond_with smode # build with /smode command support
+%bcond_with crypt # build with crypted passwords support
+#
Summary: Internet Relay Chat Server
Summary(pl): Serwer IRC (Internet Relay Chat)
Name: bircd
-Version: 2.0.3rc6
+Version: 2.0.3rc11
Release: 1
License: GPL
Group: Daemons
-Source0: http://www.onthanet.nl/~borg/download/%{name}%{version}.tgz
-# Source0-md5: 2b59be1677db237521ae0c628511866c
+Source0: ftp://ftp.benet.uu3.net/pub/ircd/%{name}-%{version}.tgz
+# Source0-md5: b6b28fecb070c2695797105abf9929f1
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}.logrotate
+Source4: %{name}.motd
Patch0: %{name}-makefile.patch
Patch1: %{name}-config.patch
-Patch2: %{name}-fix.patch
-URL: http://www.onthanet.nl/~borg/
+Patch2: %{name}-smode.patch
+Patch3: %{name}-crypt.patch
+Patch4: %{name}-fix.patch
+URL: http://www.benet.uu3.net/~borg/
BuildRequires: rpmbuild(macros) >= 1.159
PreReq: rc-scripts
Requires(pre): /usr/bin/getgid
IPv6.
%prep
-%setup -q -n bircd
+%setup -q -n %{name}
%patch0 -p1
%patch1 -p1
-%patch2 -p1
+%{?with_smode:%patch2 -p1}
+%{?with_crypt:%patch3 -p1}
+%patch4 -p1
%build
./Config
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ircd
install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ircd
install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/ircd
-
-cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/ircd.motd
-
-Powered by \ 2PLD\ 2 \ 2L\ 2inux \ 2D\ 2istribution \ 2IRC Server\ 2!
-
-WWW\ 2:\ 2 \ 2http://www.pld-linux.org/\ 2
-FTP\ 2:\ 2 \ 2ftp://ftp.pld-linux.org/\ 2
-e-mail\ 2:\ 2 \ 2feedback@pld-linux.org\ 2
-
-EOF
+install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/ircd.motd
touch $RPM_BUILD_ROOT%{_localstatedir}/ircd.pid
%attr(770,root,ircd) %dir %{_localstatedir}
%attr(640,ircd,ircd) %ghost %{_localstatedir}/ircd.pid
%attr(750,root,ircd) %dir %{_sysconfdir}
-%attr(660,root,ircd) %config(noreplace) %{_sysconfdir}/ircd.conf
-%attr(664,root,ircd) %{_sysconfdir}/ircd.motd
+%attr(660,root,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ircd.conf
+%attr(660,root,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ircd.motd
%attr(754,root,root) /etc/rc.d/init.d/ircd
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/ircd
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/ircd
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ircd
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ircd