File ngircd.spec of Package ngircd

# norootforbuild

#
Name:      ngircd
Version:   16
Release:   1.1
#
License:   GPL
Group:     Productivity/Networking/IRC
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: tcpd-devel zlib-devel 
%define with_zeroconf 0
%if 0%{?suse_version} >= 1020
BuildRequires: avahi-compat-howl-devel
%define with_zeroconf 1
%endif
#
%define    home_dir %{_var}/lib/%{name}
%define    pid_dir  %{_var}/run/%{name}
#
URL:       http://ngircd.barton.de/
Source:    ngircd-16.tar.gz
Source1:   ngircd.init
#Patch:     ngircd-0.10.0_default_config.patch
#
Summary:   Next Generation IRC Daemon
%description
ngIRCd is a free open source daemon for Internet Relay Chat (IRC), developed
under the GNU General Public License (GPL). It's written from scratch and is
not based upon the original IRCd like many others.

Advantages

Why should you use ngIRCd? Because ...
    * there are no problems with servers on changing or non-static IP
      addresses.
    * there is a small and lean configuration file.
    * there is a free, modern and open source C source code.
    * it is still under active development.

ngIRCd is compatible to the "original" ircd 2.10.3p3, so you can run mixed
networks.


Authors:
--------
    Alexander Barton (alex@barton.de)


%prep
%setup
#%patch

%build
%configure \
%if 0%{?with_zeroconf}
  --with-zeroconf \
%endif
  --with-tcp-wrappers \
  --enable-ipv6
# todo: figure out the buildrequires for --with-zeroconf
%{__make}

%install
%makeinstall docdir=%{_docdir}/%{name}
%{__install} -d -m 0755 %{buildroot}%{home_dir}%{pid_dir} %{buildroot}%{pid_dir}
# for %ghost
touch %{buildroot}%{_sysconfdir}/ngircd.motd
# init script
%{__install} -D -m 0755 %{S:1}             %{buildroot}%{_sysconfdir}/init.d/%{name}
%{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}

%clean
%{__rm} -rf %{buildroot}

%pre
/usr/sbin/groupadd -r %{name} &>/dev/null ||:
/usr/sbin/useradd -o -g %{name} -s /bin/false -r -c "%{name} irc server" -d %{home_dir} %{name} &>/dev/null ||:

%post
%fillup_and_insserv %{name}

%preun
%stop_on_removal %{name}

%postun
%restart_on_update %{name}
%{insserv_cleanup}

%files
%defattr(-,root,root,-)
%config(noreplace)        %attr(0640,root,ngircd) %{_sysconfdir}/ngircd.conf
%ghost %config(noreplace) %attr(0640,root,ngircd) %{_sysconfdir}/ngircd.motd
%{_sbindir}/ngircd
%{_mandir}/man5/ngircd.conf.5*
%{_mandir}/man8/ngircd.8*
%doc %{_docdir}/%{name}/
%attr(755,root,root) %{home_dir}/
%attr(755,ngircd,ngircd) %{home_dir}%{pid_dir}
%attr(755,ngircd,ngircd) %{pid_dir}
%{_sysconfdir}/init.d/%{name}
%{_sbindir}/rc%{name}

%changelog
* Fri Jul 18 2008 mrueckert@suse.de
- enable zeroconf on 10.2 and newer
* Fri Jul 18 2008 mrueckert@suse.de
- update to version 0.12.1:
  too many changes since the last package upgrade. please consult
  /usr/share/doc/packages/ngircd/ChangeLog
- removed ngircd-0.10.0_man_page_paths.patch:
  better solution upstream
- enable ipv6 support
* Mon Oct  1 2007 mrueckert@suse.de
- update to version 0.10.3:
  - SECURITY: Fixed a severe bug in handling JOIN commands, which
    could cause the server to crash.
    Thanks to Sebastian Vesper, <net@veoson.net>.
* Fri Jun  8 2007 mrueckert@suse.de
- update to version 0.10.2:
  - Server links are allowed to use larger write buffers now (up
    to 50 KB).
  - Fix compressed server links (broken since 0.10.0).
  - Predefined Channel configuration now allows specification of
    channel key (mode k) and maximum user count (mode l).
  - When using epoll() IO interface, compile in the select()
    interface as well and fall back to it when epoll() isn't
    available on runtime.
  - New configure option "--without-select" to disable select()
    IO API (even when using epoll(), see above).
  - Added support for IO APIs "poll()" and "/dev/poll".
  - Reorganized internal handling of invite and ban lists.
* Sun Dec 17 2006 mrueckert@suse.de
- update to version 0.10.1:
  - Fixed validation of server names containing digits.
  - Update the "info text" of the local server after re-reading
    configuration.
  - Changed Numerics 265 and 266 to follow ircd 2.11.x "standards".
  - Allow PASS syntax defined in RFC 1459 for server links, too.
  - Enhanced ISUPPORT message (005 numeric).
  - New configuration option "PredefChannelsOnly": if set,
    clients can only join predefined channels.
  - Code cleanups: use "LogDebug(...)" instead of
    "Log(LOG_DEBUG, ...)", use "strcspn()", unsigned vs. signed,
    use "const", fix whitespaces, ...
* Tue Oct  3 2006 mrueckert@suse.de
- enabled ident support
* Mon Oct  2 2006 mrueckert@suse.de
- initial package of version 0.10.0
openSUSE Build Service is sponsored by