2 # - modify to use system available shared adns library.
3 # - rewrite ipv6 support to work with non-v6 systems
6 %bcond_with ipv6 # - enable ipv6 support - do not use for v4-only machines.
7 %bcond_with ssl # - enable use ssl
8 %bcond_with longnicks # - enable long nicknames. All servers on the network must use the same length.
9 %bcond_with longtopics # - enable long topics. All servers on the network must use the same length.
11 Summary: Internet Relay Chat Server
12 Summary(pl.UTF-8): Serwer IRC
19 Source0: http://downloads.sourceforge.net/ircd-hybrid/%{name}-%{version}.tgz
20 # Source0-md5: 5e5d93dbd55e6865d75ee18a2b56170f
22 Source2: %{name}.sysconfig
24 Patch0: %{name}-config.patch
25 Patch1: %{name}-change_uid.patch
26 Patch2: %{name}-opt.patch
27 Patch3: %{name}-open-3-args.patch
28 URL: http://www.ircd-hybrid.org/
29 BuildRequires: autoconf
30 BuildRequires: automake
33 BuildRequires: gettext-devel
34 BuildRequires: rpmbuild(macros) >= 1.268
35 BuildRequires: zlib-devel
36 Requires(post,preun): /sbin/chkconfig
37 Requires(postun): /usr/sbin/groupdel
38 Requires(postun): /usr/sbin/userdel
39 Requires(pre): /bin/id
40 Requires(pre): /usr/bin/getgid
41 Requires(pre): /usr/sbin/groupadd
42 Requires(pre): /usr/sbin/useradd
48 Obsoletes: ircd-ptlink
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 %define _sysconfdir /etc/ircd
53 %define _localstatedir /var/lib/ircd
56 Ircd-hybrid is an advanced IRC server which is most commonly used on
57 the EFNet IRC network. It is fast, reliable, and powerful. This
58 version supports IPv6.
60 %description -l pl.UTF-8
61 Ircd-hybrid jest zaawansowanym serwerem IRC, najczęściej używanym w
62 sieci EFNet. Jest szybki, stabilny i wydajny. Ta wersja obsługuje
73 mv -f autoconf/{configure.in,acconfig.h} .
74 cp -f %{_datadir}/automake/config.* autoconf
78 CFLAGS="%{rpmcflags} %{?debug:-DDEBUGMODE}"
81 %{?with_ipv6:--enable-ipv6} \
83 %{?with_longnicks:--with-nicklen=20} \
84 %{?with_longtopics:--with-topiclen=500} \
85 %{?with_ssl:--enable-openssl} \
86 %{!?with_ssl:--disable-openssl} \
87 --enable-shared-modules \
92 rm -rf $RPM_BUILD_ROOT
93 install -d $RPM_BUILD_ROOT{%{_libdir}/ircd,%{_var}/log/ircd,%{_sysconfdir}} \
94 $RPM_BUILD_ROOT{%{_libdir}/ircd/{modules{,/autoload},tools,help},%{_sbindir},%{_mandir}/man8} \
95 $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_localstatedir},/var/run/ircd}
97 install src/ircd $RPM_BUILD_ROOT%{_sbindir}/ircd
98 install servlink/servlink $RPM_BUILD_ROOT%{_sbindir}/servlink
99 install doc/ircd.8 $RPM_BUILD_ROOT%{_mandir}/man8
100 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ircd
101 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ircd
102 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ircd.conf
103 touch $RPM_BUILD_ROOT{%{_sysconfdir}/{{dline,kline}.conf,{ircd,opers}.motd},%{_var}/log/ircd/{foper,oper,user}.log}
106 install *.so $RPM_BUILD_ROOT%{_libdir}/ircd/modules/autoload
108 install *.so $RPM_BUILD_ROOT%{_libdir}/ircd/modules
113 for i in convertconf convertilines convertklines encspeed mkkeypair mkpasswd untabify viconf; do
114 install $i $RPM_BUILD_ROOT%{_libdir}/ircd/tools/$i
119 cp -rf opers users $RPM_BUILD_ROOT%{_libdir}/ircd/help
123 rm -rf $RPM_BUILD_ROOT
126 %groupadd -f -g 75 ircd
127 %useradd -g ircd -d /etc/ircd -u 75 -c "IRC service account" -s /bin/true ircd
130 /sbin/chkconfig --add ircd
131 %service ircd restart "IRC daemon"
134 if [ "$1" = "0" ]; then
136 /sbin/chkconfig --del ircd
140 if [ "$1" = "0" ]; then
146 %defattr(644,root,root,755)
147 %doc doc/{*.txt,*.conf,server-version-info,technical} RELNOTES ChangeLog Hybrid-team BUGS TODO
148 %attr(755,root,root) %{_sbindir}/*
149 %attr(770,root,ircd) %dir %{_sysconfdir}
150 %attr(660,ircd,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ircd.conf
151 %attr(660,ircd,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dline.conf
152 %attr(660,ircd,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kline.conf
153 %attr(660,ircd,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ircd.motd
154 %attr(660,ircd,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opers.motd
155 %attr(754,root,root) /etc/rc.d/init.d/ircd
156 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ircd
158 %dir %{_libdir}/ircd/modules
159 %dir %{_libdir}/ircd/tools
160 %dir %{_libdir}/ircd/help
161 %attr(755,root,root) %{_libdir}/ircd/modules/*
162 %attr(755,root,root) %{_libdir}/ircd/tools/*
163 %{_libdir}/ircd/help/*
164 %attr(770,root,ircd) %dir %{_var}/log/ircd
165 %attr(700,ircd,ircd) %ghost %{_var}/log/ircd/*
166 %attr(770,root,ircd) %dir %{_localstatedir}
168 %attr(770,ircd,ircd) %dir /var/run/ircd