/[packages]/cauldron/ircd-hybrid/current/SPECS/ircd-hybrid.spec
ViewVC logotype

Annotation of /cauldron/ircd-hybrid/current/SPECS/ircd-hybrid.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 398256 - (hide annotations) (download)
Wed Feb 13 20:54:26 2013 UTC (8 years, 7 months ago) by colin
File size: 6517 byte(s)
Drop sysconfig file (it's contents were unused)
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     Source3: %{name}.logrotate
25 colin 359019 Source4: %{name}-tmpfiles.conf
26 colin 140577 Patch0: %{name}-config.patch
27     Patch3: %{name}-7.2.3-fix-x86_64-build.patch
28     Patch4: %{name}-7.2.3-fix-module-path.patch
29     Patch5: ircd-hybrid-7.2.3-fix-str-fmt.patch
30 luigiwalser 396863 Patch6: ircd-hybrid-7.2.3-CVE-2013-0238.patch
31 colin 398254 Patch7: ircd-hybrid-7.2.3-libdir-path.patch
32 luigiwalser 396863
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 398254 %patch7 -p1
65 colin 140577
66     # Clear all before start
67     #rm -rf `find -type d -name autom4te.cache`
68     #mv -f autoconf/{configure.in,acconfig.h} .
69    
70     %build
71 colin 398254 autoreconf
72 colin 140577
73     %serverbuild
74     %configure2_5x \
75     --enable-zlib \
76     --enable-small-net \
77     --enable-openssl \
78     --disable-assert \
79     --with-nicklen=12 \
80     --with-maxclients=512 \
81     %{?_with_ipv6:--enable-ipv6} \
82     %{?_with_efnet:--enable-efnet}
83     %make
84    
85     %install
86     rm -rf %{buildroot}
87 colin 359019 install -d %{buildroot}{%{_libdir}/ircd-hybrid,%{_var}/log/ircd-hybrid,%{_sysconfdir}/{ircd-hybrid,rc.d/init.d,sysconfig,logrotate.d}} \
88 colin 140577 %{buildroot}{%{_libdir}/ircd-hybrid/{modules{,/autoload},tools,help},%{_sbindir},%{_mandir}/man8,%{_localstatedir}/lib/ircd-hybrid} \
89     %{buildroot}{%{_includedir}/%{name},%{_messagesdir},%{_messagesdir}/{ayb{,/LC_MESSAGES},custom{,/LC_MESSAGES}}}
90    
91     install src/ircd %{buildroot}%{_sbindir}/ircd-hybrid
92     install servlink/servlink %{buildroot}%{_sbindir}/servlink
93     install etc/*.conf %{buildroot}%{_sysconfdir}/ircd-hybrid
94     # which conf file we need?
95     %if %{with_EFnet}
96     mv %{buildroot}%{_sysconfdir}/ircd-hybrid/example.efnet.conf %{buildroot}%{_sysconfdir}/ircd-hybrid/ircd.conf
97     rm %{buildroot}%{_sysconfdir}/ircd-hybrid/{simple.conf,example.conf}
98     %else
99     mv %{buildroot}%{_sysconfdir}/ircd-hybrid/simple.conf %{buildroot}%{_sysconfdir}/ircd-hybrid/ircd.conf
100     rm %{buildroot}%{_sysconfdir}/ircd-hybrid/example.efnet.conf
101     %endif
102     #mv %{buildroot}%{_sysconfdir}/ircd-hybrid/convertconf-example.conf %{buildroot}%{_sysconfdir}/ircd-hybrid/.convertconf-example.conf
103     #install doc/ircd.motd %{buildroot}%{_sysconfdir}/ircd-hybrid
104     install doc/ircd.8 %{buildroot}%{_mandir}/man8/ircd-hybrid.8
105     install include/*.h %{buildroot}%{_includedir}/%{name}
106     install %{SOURCE1} %{buildroot}/etc/rc.d/init.d/ircd-hybrid
107     install %{SOURCE3} %{buildroot}/etc/logrotate.d/ircd-hybrid
108 colin 359019 install -D -p -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
109 colin 140577
110     cd modules
111     install *.so %{buildroot}%{_libdir}/ircd-hybrid/modules/autoload
112     cd core
113     install *.so %{buildroot}%{_libdir}/ircd-hybrid/modules
114     cd ..
115     cd ..
116    
117     # make this to have ircservices support
118     cd contrib
119     make ; install *.so %{buildroot}%{_libdir}/ircd-hybrid/modules
120     cd ..
121    
122     cd tools
123     for i in encspeed mkkeypair mkpasswd untabify; do
124     install $i %{buildroot}%{_libdir}/ircd-hybrid/tools/$i
125     done
126     cd ..
127    
128     cd help
129    
130     cp -rf opers users %{buildroot}%{_libdir}/ircd-hybrid/help
131    
132     for link in topic accept cjoin cmode admin names links away whowas \
133     version kick who invite quit join list nick oper part \
134     time credits motd userhost users whois ison lusers \
135     user help pass error challenge knock ping pong; do \
136     rm -f %{buildroot}%{_libdir}/ircd-hybrid/help/users/$link; \
137     ln -s %{_libdir}/ircd-hybrid/help/opers/$link %{buildroot}%{_libdir}/ircd-hybrid/help/users; \
138     done
139     cd ..
140    
141     cd messages
142     install *.lang %{buildroot}%{_messagesdir}
143     cd ..
144    
145     %multiarch_binaries %{buildroot}%_includedir/%{name}/*.h
146    
147     %pre
148 colin 359019 %_pre_useradd %{name} %{_localstatedir}/lib/ircd-hybrid /bin/false
149 colin 140577
150     %post
151 colin 359019 %_tmpfilescreate %{name}
152     %_post_service %{name}
153 colin 140577 %create_ghostfile /var/log/ircd-hybrid/user.log ircd-hybrid ircd-hybrid 0644
154     %create_ghostfile /var/log/ircd-hybrid/oper.log ircd-hybrid ircd-hybrid 0644
155     %create_ghostfile /var/log/ircd-hybrid/foper.log ircd-hybrid ircd-hybrid 0644
156     update-alternatives --install %{_sbindir}/ircd ircd %{_sbindir}/ircd-hybrid 10
157    
158     %preun
159 colin 359019 %_preun_service %{name}
160 colin 140577
161     # remove hardlinks
162     rm -f %{_libdir}/ircd-hybrid/tools/viklines %{_libdir}/ircd-hybrid/tools/vimotd
163    
164     %postun
165 colin 359019 %_postun_userdel %{name}
166 colin 140577
167     update-alternatives --remove ircd %{_sbindir}/ircd-hybrid
168    
169     %clean
170     rm -rf %{buildroot}
171    
172     %files
173     %defattr(644,root,root,755)
174     %doc doc/{*.txt,server-version-info,technical} Hybrid-team LICENSE BUGS RELNOTES TODO
175     %attr(755,root,root) %{_sbindir}/*
176     %attr(755,ircd-hybrid,ircd-hybrid) %dir %{_sysconfdir}/ircd-hybrid
177     #%attr(644,ircd-hybrid,ircd-hybrid) %config(noreplace) %{_sysconfdir}/ircd-hybrid/.convertconf-example.conf
178     %attr(644,ircd-hybrid,ircd-hybrid) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/ircd-hybrid/*
179     %attr(644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/ircd-hybrid
180     %attr(755,root,root) /etc/rc.d/init.d/ircd-hybrid
181 colin 359019 %{_tmpfilesdir}/%{name}.conf
182 colin 140577 %dir %{_libdir}/ircd-hybrid
183     %dir %{_libdir}/ircd-hybrid/modules
184     %dir %{_libdir}/ircd-hybrid/tools
185     %dir %{_libdir}/ircd-hybrid/help
186     %dir %{_messagesdir}
187     %{_messagesdir}/*
188     %attr(755,ircd-hybrid,ircd-hybrid) %dir %{_localstatedir}/lib/ircd-hybrid
189     %attr(755,root,root) %{_libdir}/ircd-hybrid/modules/*
190     %attr(755,root,root) %{_libdir}/ircd-hybrid/tools/*
191     %attr(755,root,root) %{_libdir}/ircd-hybrid/help/*
192     %attr(755,ircd-hybrid,ircd-hybrid) %dir %{_var}/log/ircd-hybrid
193     %{_mandir}/man*/*
194    
195     # devel
196     %files devel
197     %defattr(644,root,root,755)
198     %{_includedir}/%{name}
199     %doc ChangeLog

  ViewVC Help
Powered by ViewVC 1.1.28