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