1 |
colin |
140577 |
%define name ircd-hybrid |
2 |
|
|
%define version 7.2.3 |
3 |
colin |
398254 |
%define release %mkrel 14 |
4 |
colin |
140577 |
%define _messagesdir %{_libdir}/ircd-hybrid/messages |
5 |
|
|
|
6 |
|
|
# default: Don't build with IPv6 for production server |
7 |
|
|
%define with_IPv6 0 |
8 |
|
|
%{?_without_ipv6: %{expand: %%global with_IPv6 0}} |
9 |
|
|
%{?_with_ipv6: %{expand: %%global with_IPv6 1}} |
10 |
|
|
# default: Don't build with EFnet support |
11 |
|
|
%define with_EFnet 0 |
12 |
|
|
%{?_without_efnet: %{expand: %%global with_EFnet 0}} |
13 |
|
|
%{?_with_efnet: %{expand: %%global with_EFnet 1}} |
14 |
|
|
|
15 |
|
|
Name: %{name} |
16 |
|
|
Version: %{version} |
17 |
|
|
Release: %{release} |
18 |
|
|
Summary: Internet Relay Chat Server |
19 |
|
|
License: GPL |
20 |
|
|
Group: Networking/IRC |
21 |
|
|
URL: http://www.ircd-hybrid.org/ |
22 |
|
|
Source0: http://prdownloads.sf.net/ircd-hybrid/%{name}-%{version}.tar.bz2 |
23 |
|
|
Source1: %{name}.init |
24 |
|
|
Source2: %{name}.sysconfig |
25 |
|
|
Source3: %{name}.logrotate |
26 |
colin |
359019 |
Source4: %{name}-tmpfiles.conf |
27 |
colin |
140577 |
Patch0: %{name}-config.patch |
28 |
|
|
Patch3: %{name}-7.2.3-fix-x86_64-build.patch |
29 |
|
|
Patch4: %{name}-7.2.3-fix-module-path.patch |
30 |
|
|
Patch5: ircd-hybrid-7.2.3-fix-str-fmt.patch |
31 |
luigiwalser |
396863 |
Patch6: ircd-hybrid-7.2.3-CVE-2013-0238.patch |
32 |
colin |
398254 |
Patch7: ircd-hybrid-7.2.3-libdir-path.patch |
33 |
luigiwalser |
396863 |
|
34 |
colin |
140577 |
Requires(post,postun): rpm-helper update-alternatives |
35 |
|
|
BuildRequires: autoconf |
36 |
|
|
BuildRequires: automake |
37 |
|
|
BuildRequires: openssl-devel >= 0.9.7 |
38 |
|
|
BuildRequires: zlib-devel |
39 |
|
|
BuildRequires: elfutils-devel |
40 |
|
|
# Both have a |
41 |
|
|
Conflicts: ircd |
42 |
|
|
|
43 |
|
|
%package devel |
44 |
|
|
Summary: Development headers for %{name} |
45 |
|
|
Group: Networking/IRC |
46 |
|
|
Requires: %{name} = %{version} |
47 |
|
|
|
48 |
|
|
%description |
49 |
|
|
Ircd-hybrid is an advanced IRC server which is most commonly used on |
50 |
|
|
the EFNet IRC network. It is fast, reliable, and powerful. |
51 |
|
|
Build time options: |
52 |
|
|
IPv6 support: --with ipv6 %{with_IPv6} |
53 |
|
|
EFnet support: --with efnet %{with_EFnet} |
54 |
|
|
|
55 |
|
|
%description devel |
56 |
|
|
Development headers and libraries for %{name} |
57 |
|
|
|
58 |
|
|
%prep |
59 |
|
|
%setup -q |
60 |
|
|
%patch0 -p1 |
61 |
|
|
%patch3 -p0 |
62 |
|
|
%patch4 -p0 |
63 |
|
|
%patch5 -p0 |
64 |
luigiwalser |
396863 |
%patch6 -p1 |
65 |
colin |
398254 |
%patch7 -p1 |
66 |
colin |
140577 |
|
67 |
|
|
# Clear all before start |
68 |
|
|
#rm -rf `find -type d -name autom4te.cache` |
69 |
|
|
#mv -f autoconf/{configure.in,acconfig.h} . |
70 |
|
|
|
71 |
|
|
%build |
72 |
colin |
398254 |
autoreconf |
73 |
colin |
140577 |
|
74 |
|
|
%serverbuild |
75 |
|
|
%configure2_5x \ |
76 |
|
|
--enable-zlib \ |
77 |
|
|
--enable-small-net \ |
78 |
|
|
--enable-openssl \ |
79 |
|
|
--disable-assert \ |
80 |
|
|
--with-nicklen=12 \ |
81 |
|
|
--with-maxclients=512 \ |
82 |
|
|
%{?_with_ipv6:--enable-ipv6} \ |
83 |
|
|
%{?_with_efnet:--enable-efnet} |
84 |
|
|
%make |
85 |
|
|
|
86 |
|
|
%install |
87 |
|
|
rm -rf %{buildroot} |
88 |
colin |
359019 |
install -d %{buildroot}{%{_libdir}/ircd-hybrid,%{_var}/log/ircd-hybrid,%{_sysconfdir}/{ircd-hybrid,rc.d/init.d,sysconfig,logrotate.d}} \ |
89 |
colin |
140577 |
%{buildroot}{%{_libdir}/ircd-hybrid/{modules{,/autoload},tools,help},%{_sbindir},%{_mandir}/man8,%{_localstatedir}/lib/ircd-hybrid} \ |
90 |
|
|
%{buildroot}{%{_includedir}/%{name},%{_messagesdir},%{_messagesdir}/{ayb{,/LC_MESSAGES},custom{,/LC_MESSAGES}}} |
91 |
|
|
|
92 |
|
|
install src/ircd %{buildroot}%{_sbindir}/ircd-hybrid |
93 |
|
|
install servlink/servlink %{buildroot}%{_sbindir}/servlink |
94 |
|
|
install etc/*.conf %{buildroot}%{_sysconfdir}/ircd-hybrid |
95 |
|
|
# which conf file we need? |
96 |
|
|
%if %{with_EFnet} |
97 |
|
|
mv %{buildroot}%{_sysconfdir}/ircd-hybrid/example.efnet.conf %{buildroot}%{_sysconfdir}/ircd-hybrid/ircd.conf |
98 |
|
|
rm %{buildroot}%{_sysconfdir}/ircd-hybrid/{simple.conf,example.conf} |
99 |
|
|
%else |
100 |
|
|
mv %{buildroot}%{_sysconfdir}/ircd-hybrid/simple.conf %{buildroot}%{_sysconfdir}/ircd-hybrid/ircd.conf |
101 |
|
|
rm %{buildroot}%{_sysconfdir}/ircd-hybrid/example.efnet.conf |
102 |
|
|
%endif |
103 |
|
|
#mv %{buildroot}%{_sysconfdir}/ircd-hybrid/convertconf-example.conf %{buildroot}%{_sysconfdir}/ircd-hybrid/.convertconf-example.conf |
104 |
|
|
#install doc/ircd.motd %{buildroot}%{_sysconfdir}/ircd-hybrid |
105 |
|
|
install doc/ircd.8 %{buildroot}%{_mandir}/man8/ircd-hybrid.8 |
106 |
|
|
install include/*.h %{buildroot}%{_includedir}/%{name} |
107 |
|
|
install %{SOURCE1} %{buildroot}/etc/rc.d/init.d/ircd-hybrid |
108 |
|
|
install %{SOURCE2} %{buildroot}/etc/sysconfig/ircd-hybrid |
109 |
|
|
install %{SOURCE3} %{buildroot}/etc/logrotate.d/ircd-hybrid |
110 |
colin |
359019 |
install -D -p -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf |
111 |
colin |
140577 |
|
112 |
|
|
cd modules |
113 |
|
|
install *.so %{buildroot}%{_libdir}/ircd-hybrid/modules/autoload |
114 |
|
|
cd core |
115 |
|
|
install *.so %{buildroot}%{_libdir}/ircd-hybrid/modules |
116 |
|
|
cd .. |
117 |
|
|
cd .. |
118 |
|
|
|
119 |
|
|
# make this to have ircservices support |
120 |
|
|
cd contrib |
121 |
|
|
make ; install *.so %{buildroot}%{_libdir}/ircd-hybrid/modules |
122 |
|
|
cd .. |
123 |
|
|
|
124 |
|
|
cd tools |
125 |
|
|
for i in encspeed mkkeypair mkpasswd untabify; do |
126 |
|
|
install $i %{buildroot}%{_libdir}/ircd-hybrid/tools/$i |
127 |
|
|
done |
128 |
|
|
cd .. |
129 |
|
|
|
130 |
|
|
cd help |
131 |
|
|
|
132 |
|
|
cp -rf opers users %{buildroot}%{_libdir}/ircd-hybrid/help |
133 |
|
|
|
134 |
|
|
for link in topic accept cjoin cmode admin names links away whowas \ |
135 |
|
|
version kick who invite quit join list nick oper part \ |
136 |
|
|
time credits motd userhost users whois ison lusers \ |
137 |
|
|
user help pass error challenge knock ping pong; do \ |
138 |
|
|
rm -f %{buildroot}%{_libdir}/ircd-hybrid/help/users/$link; \ |
139 |
|
|
ln -s %{_libdir}/ircd-hybrid/help/opers/$link %{buildroot}%{_libdir}/ircd-hybrid/help/users; \ |
140 |
|
|
done |
141 |
|
|
cd .. |
142 |
|
|
|
143 |
|
|
cd messages |
144 |
|
|
install *.lang %{buildroot}%{_messagesdir} |
145 |
|
|
cd .. |
146 |
|
|
|
147 |
|
|
%multiarch_binaries %{buildroot}%_includedir/%{name}/*.h |
148 |
|
|
|
149 |
|
|
%pre |
150 |
colin |
359019 |
%_pre_useradd %{name} %{_localstatedir}/lib/ircd-hybrid /bin/false |
151 |
colin |
140577 |
|
152 |
|
|
%post |
153 |
colin |
359019 |
%_tmpfilescreate %{name} |
154 |
|
|
%_post_service %{name} |
155 |
colin |
140577 |
%create_ghostfile /var/log/ircd-hybrid/user.log ircd-hybrid ircd-hybrid 0644 |
156 |
|
|
%create_ghostfile /var/log/ircd-hybrid/oper.log ircd-hybrid ircd-hybrid 0644 |
157 |
|
|
%create_ghostfile /var/log/ircd-hybrid/foper.log ircd-hybrid ircd-hybrid 0644 |
158 |
|
|
update-alternatives --install %{_sbindir}/ircd ircd %{_sbindir}/ircd-hybrid 10 |
159 |
|
|
|
160 |
|
|
%preun |
161 |
colin |
359019 |
%_preun_service %{name} |
162 |
colin |
140577 |
|
163 |
|
|
# remove hardlinks |
164 |
|
|
rm -f %{_libdir}/ircd-hybrid/tools/viklines %{_libdir}/ircd-hybrid/tools/vimotd |
165 |
|
|
|
166 |
|
|
%postun |
167 |
colin |
359019 |
%_postun_userdel %{name} |
168 |
colin |
140577 |
|
169 |
|
|
update-alternatives --remove ircd %{_sbindir}/ircd-hybrid |
170 |
|
|
|
171 |
|
|
%clean |
172 |
|
|
rm -rf %{buildroot} |
173 |
|
|
|
174 |
|
|
%files |
175 |
|
|
%defattr(644,root,root,755) |
176 |
|
|
%doc doc/{*.txt,server-version-info,technical} Hybrid-team LICENSE BUGS RELNOTES TODO |
177 |
|
|
%attr(755,root,root) %{_sbindir}/* |
178 |
|
|
%attr(755,ircd-hybrid,ircd-hybrid) %dir %{_sysconfdir}/ircd-hybrid |
179 |
|
|
#%attr(644,ircd-hybrid,ircd-hybrid) %config(noreplace) %{_sysconfdir}/ircd-hybrid/.convertconf-example.conf |
180 |
|
|
%attr(644,ircd-hybrid,ircd-hybrid) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/ircd-hybrid/* |
181 |
|
|
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/ircd-hybrid |
182 |
|
|
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/ircd-hybrid |
183 |
|
|
%attr(755,root,root) /etc/rc.d/init.d/ircd-hybrid |
184 |
colin |
359019 |
%{_tmpfilesdir}/%{name}.conf |
185 |
colin |
140577 |
%dir %{_libdir}/ircd-hybrid |
186 |
|
|
%dir %{_libdir}/ircd-hybrid/modules |
187 |
|
|
%dir %{_libdir}/ircd-hybrid/tools |
188 |
|
|
%dir %{_libdir}/ircd-hybrid/help |
189 |
|
|
%dir %{_messagesdir} |
190 |
|
|
%{_messagesdir}/* |
191 |
|
|
%attr(755,ircd-hybrid,ircd-hybrid) %dir %{_localstatedir}/lib/ircd-hybrid |
192 |
|
|
%attr(755,root,root) %{_libdir}/ircd-hybrid/modules/* |
193 |
|
|
%attr(755,root,root) %{_libdir}/ircd-hybrid/tools/* |
194 |
|
|
%attr(755,root,root) %{_libdir}/ircd-hybrid/help/* |
195 |
|
|
%attr(755,ircd-hybrid,ircd-hybrid) %dir %{_var}/log/ircd-hybrid |
196 |
|
|
%{_mandir}/man*/* |
197 |
|
|
|
198 |
|
|
# devel |
199 |
|
|
%files devel |
200 |
|
|
%defattr(644,root,root,755) |
201 |
|
|
%{_includedir}/%{name} |
202 |
|
|
%doc ChangeLog |