3 %bcond_with smode # build with /smode command support
4 %bcond_with crypt # build with crypted passwords support
6 Summary: Internet Relay Chat Server
7 Summary(pl): Serwer IRC (Internet Relay Chat)
13 Source0: ftp://ftp.benet.uu3.net/pub/irc/%{name}-%{version}.tgz
14 # Source0-md5: 5e7b6b4ff8f3ed541d032c96eeee8de1
16 Source2: %{name}.sysconfig
17 Source3: %{name}.logrotate
19 Patch0: %{name}-makefile.patch
20 Patch1: %{name}-config.patch
21 Patch2: %{name}-smode.patch
22 Patch3: %{name}-crypt.patch
23 Patch4: %{name}-%{version}-p1.patch
24 URL: http://www.benet.uu3.net/~borg/
25 BuildRequires: rpmbuild(macros) >= 1.268
26 Requires(post): fileutils
27 Requires(post,preun): /sbin/chkconfig
28 Requires(postun): /usr/sbin/groupdel
29 Requires(postun): /usr/sbin/userdel
30 Requires(pre): /bin/id
31 Requires(pre): /usr/bin/getgid
32 Requires(pre): /usr/sbin/groupadd
33 Requires(pre): /usr/sbin/useradd
38 Obsoletes: ircd-hybrid
39 Obsoletes: ircd-ptlink
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define _sysconfdir /etc/ircd
44 %define _localstatedir /var/lib/ircd
47 bIRCd is a small, simple and very fast IRC server. It is easy to
48 configure and use. It also has support for IPv6.
51 bIRCd jest ma³ym, prostym i bardzo szybkim serwerem IRC. Jest bardzo
52 prosty w konfiguracji i u¿ytkowaniu. Posiada równie¿ wsparcie dla
59 %{?with_smode:%patch2 -p1}
60 %{?with_crypt:%patch3 -p1}
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT{%{_var}/log/{,archiv/}ircd,%{_sbindir}} \
71 $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,logrotate.d}} \
72 $RPM_BUILD_ROOT%{_localstatedir}
75 DESTDIR=$RPM_BUILD_ROOT
77 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ircd
78 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ircd
79 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/ircd
80 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/ircd.motd
82 touch $RPM_BUILD_ROOT%{_localstatedir}/ircd.pid
85 rm -rf $RPM_BUILD_ROOT
88 %groupadd -f -g 75 ircd
89 %useradd -g ircd -d /etc/ircd -u 75 -s /bin/true -c "IRC Service account" ircd
92 /sbin/chkconfig --add ircd
93 %service ircd restart "IRC daemon"
94 touch /var/log/ircd/{opers.log,rejects.log,users.log}
95 chmod 640 /var/log/ircd/*
96 chown ircd:ircd /var/log/ircd/*
99 if [ "$1" = "0" ]; then
101 /sbin/chkconfig --del ircd
105 if [ "$1" = "0" ]; then
111 %defattr(644,root,root,755)
113 %doc doc/{Advertisement,Authors,Etiquette,Manual,Operators,README.patches}
114 %doc doc/{conf.doc,example.conf,tao.of.irc,whatsnew}
115 %attr(755,root,root) %{_sbindir}/*
116 %attr(770,root,ircd) %dir %{_var}/log/ircd
117 %attr(770,root,ircd) %dir %{_var}/log/archiv/ircd
118 %attr(770,root,ircd) %dir %{_localstatedir}
119 %attr(640,ircd,ircd) %ghost %{_localstatedir}/ircd.pid
120 %attr(750,root,ircd) %dir %{_sysconfdir}
121 %attr(660,root,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ircd.conf
122 %attr(660,root,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ircd.motd
123 %attr(754,root,root) /etc/rc.d/init.d/ircd
124 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ircd
125 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ircd