# $Id: ircd-hybrid.spec,v 1.22 2009/08/21 13:59:59 tmraz Exp $ # The default (still as of 7.1.1) is only 9 %define nicklen 51 # The default is 120 and max 390 %define topiclen 120 # The default is `ulimit -Hn` (1024 on FC4) %define maxconn 1024 Summary: Internet Relay Chat Server Name: ircd-hybrid Version: 7.3.1 Release: 2%{?dist}.art License: GPLv2+ Group: System Environment/Daemons Source0: http://ovh.dl.sourceforge.net/sourceforge/ircd-hybrid/ircd-hybrid-%{version}.tgz Source1: ircd-hybrid.init Source2: ircd-hybrid.sysconfig URL: http://www.ircd-hybrid.org/ BuildRequires: openssl-devel Requires(pre): shadow-utils Requires(post): /sbin/chkconfig Requires(preun): /sbin/service, /sbin/chkconfig Requires(postun): /sbin/service BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) #Obsoletes: ircd <= 2.10.3p3 %description Ircd-hybrid is an advanced IRC server which is most commonly used on the EFNet IRC network. %prep %setup -q # These can't be overridden by configure :-( # Change config path (IRCD_PREFIX "/etc" - by default) # Change log path (IRCD_PREFIX "/logs" - by default) # Change modules/autoload path (IRCD_PREFIX "/modules/autoload/" - by default) # Change modules path (IRCD_PREFIX "/modules/" - by default) %{__perl} -pi -e 's|(^#define[\t ][\t ]*ETCPATH)[\t ].*|$1 "%{_sysconfdir}/ircd"|g; s|(^#define[\t ][\t ]*LOGPATH)[\t ].*|$1 "%{_var}/log/ircd"|g' \ include/defaults.h %build %configure \ --prefix=%{_libdir}/%{name} \ --sysconfdir=%{_sysconfdir}/ircd \ --with-nicklen=%{nicklen} \ --with-topiclen=%{topiclen} \ --with-maxconn=%{maxconn} %{__make} %{?_smp_mflags} %install %{__rm} -rf %{buildroot} %makeinstall \ prefix=%{buildroot}%{_libdir}/%{name} \ sysconfdir=%{buildroot}%{_sysconfdir}/ircd %{__install} -m 0755 -D %{SOURCE1} %{buildroot}%{_initrddir}/ircd %{__install} -m 0640 -D %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/ircd # Move example conf as the default one. It will still need to be edited %{__mv} %{buildroot}%{_sysconfdir}/ircd/example.conf \ %{buildroot}%{_sysconfdir}/ircd/ircd.conf # Move binaries with generic and potentially conflicting names ouf of the way %{__mkdir_p} %{buildroot}%{_libexecdir}/ircd/ %{__mv} %{buildroot}%{_bindir}/mkpasswd \ %{buildroot}%{_libexecdir}/ircd/ %{__mkdir_p} %{buildroot}%{_var}/log/ircd/ chmod 755 %{buildroot}%{_libdir}/%{name}/modules/*.so chmod 755 %{buildroot}%{_libdir}/%{name}/modules/autoload/*.so %{__mkdir_p} %{buildroot}%{_var}/lib/ircd %clean %{__rm} -rf %{buildroot} %pre getent group ircd >/dev/null || groupadd -r ircd getent passwd ircd >/dev/null || \ useradd -r -g ircd -d %{_libdir}/%{name} -s /sbin/nologin \ -c "IRC service account" ircd exit 0 %post /sbin/chkconfig --add ircd %preun if [ $1 -eq 0 ]; then /sbin/service ircd stop &>/dev/null || : /sbin/chkconfig --del ircd fi %postun if [ $1 -ge 1 ]; then /sbin/service ircd condrestart &>/dev/null || : fi %files %defattr(-, root, root, -) %doc doc/{*.txt,server-version-info,technical/} %doc etc/*.conf* %attr(770,ircd,ircd) %dir %{_sysconfdir}/ircd/ %attr(640,ircd,ircd) %config(noreplace) %{_sysconfdir}/ircd/* %config(noreplace) %{_sysconfdir}/sysconfig/ircd %{_sysconfdir}/rc.d/init.d/ircd %{_sbindir}/ircd %{_bindir}/servlink %{_bindir}/respond %{_libdir}/%{name} %{_libexecdir}/ircd/* %attr(770,root,ircd) %dir %{_var}/log/ircd/ %attr(770,ircd,ircd) %dir %{_var}/lib/ircd/ %{_mandir}/man8/ircd.8* %{_datadir}/%{name} %changelog * Mon Aug 20 2012 Lubomir Rintel (GoodData) - 7.3.1-2 - Fix lib directory path - Fix logging * Fri Aug 21 2009 Keiran "Affix" Smith - 7.3.1-1 - Update to 7.3.1 * Fri Aug 21 2009 Tomas Mraz - 7.2.3-10 - rebuilt with new openssl * Fri Jul 24 2009 Fedora Release Engineering - 7.2.3-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Wed Feb 25 2009 Fedora Release Engineering - 7.2.3-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat Jan 17 2009 Tomas Mraz - 7.2.3-7 - rebuild with new openssl * Thu Jul 31 2008 Tom "spot" Callaway - 7.2.3-6 - fix license tag * Mon Mar 24 2008 Eric Tanguy - 7.2.3-5 - Handle user creation like in guideline * Tue Feb 19 2008 Fedora Release Engineering - 7.2.3-4 - Autorebuild for GCC 4.3 * Wed Dec 05 2007 Release Engineering - 7.2.3-3 - Rebuild for deps * Sat May 05 2007 Eric Tanguy - 7.2.3-2 - Rebuild * Mon Aug 28 2006 Eric Tanguy - 7.2.3-1 - Update de 7.2.3 * Mon Aug 28 2006 Eric Tanguy - 7.2.2-3 - Rebuild for Fedora Extras 6 * Mon Aug 28 2006 Eric Tanguy - 7.2.2-2 - Rebuild for Fedora Extras 6 * Mon Jul 17 2006 Eric Tanguy - 7.2.2-1 - Update de 7.2.2 * Tue Feb 14 2006 Eric Tanguy - 7.2.1-1 - Update de 7.2.1 * Tue Feb 14 2006 Eric Tanguy - 7.2.0-6 - Rebuild for FC5 * Fri Feb 10 2006 Eric Tanguy - 7.2.0-5 - Rebuild for FC5 * Fri Dec 09 2005 Eric Tanguy 7.2.0-4 - Modify spec file to help files * Fri Dec 09 2005 Eric Tanguy 7.2.0-3 - Modify spec file to use configure correctly * Fri Dec 09 2005 Eric Tanguy 7.2.0-2 - Modify spec file to take into account the 7.2.0 update * Fri Dec 09 2005 Eric Tanguy 7.2.0-1 - Update to 7.2.0 * Fri Nov 18 2005 Eric Tanguy 7.1.3-11 - modify changelog - modify abslolute path to relative one for doc/Tao-of-IRC.940110 * Fri Nov 18 2005 Eric Tanguy 7.1.3-10 - modify %%{__mkdir_p} for devel * Wed Nov 16 2005 Eric Tanguy 7.1.3-9 - Patch to support openssl >= 0.9.6 - Use of sed in place of dos2unix * Wed Nov 16 2005 Eric Tanguy 7.1.3-8 - Modify source for x86_64 support * Wed Nov 09 2005 Eric Tanguy 7.1.3-7 - Change ircd's home to %{_libdir}/ircd * Mon Nov 07 2005 Eric Tanguy 7.1.3-6 - Modify chkconfig in ircd-hybrid.init - Modify premission %{_sysconfdir}/ircd/ * Fri Nov 04 2005 Eric Tanguy 7.1.3-5 - Modify chkconfig in ircd-hybrid.init * Tue Nov 01 2005 Eric Tanguy 7.1.3-4 - Use fedora-useradd instead of useradd - Create %{_var}/lib/ircd/ * Mon Oct 31 2005 Eric Tanguy 7.1.3-3 - Comment obsoletes - Modify exe permissions for modules/*.so and modules/autoload/*.so * Wed Oct 22 2005 Eric Tanguy 7.1.3-2 - Improved spec file * Wed Oct 16 2005 Eric Tanguy 7.1.3-1 - Update to 7.1.3. * Wed Sep 14 2005 Matthias Saou 7.1.2-1 - Update to 7.1.2. * Wed Aug 17 2005 Matthias Saou 7.1.1-1 - Update to 7.1.1. * Mon Feb 16 2004 Matthias Saou 7.0-5 - Adapt the great spec file from PLD. - Rewrite the init script for Fedora / YDL.