LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File znc.spec of Package znc (Project server:irc)

#
# spec file for package znc (Version 0.066)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           znc
Version:        0.206
Release:        0

License:        GPL-2.0
Group:          Productivity/Networking/IRC

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gcc-c++ openssl-devel pkgconfig

%if 0%{?suse_version}
 %if 0%{?suse_version} > 1210
BuildRequires:  cyrus-sasl-devel
 %else
BuildRequires:  cyrus-sasl2-devel
 %endif
%endif
%if 0%{?fedora_version}
BuildRequires:  cyrus-sasl-devel which
BuildRequires:  perl-devel
%endif
%if 0%{?mandriva_version}
BuildRequires:  libsasl2-devel perl-devel
%endif

Url:            http://en.znc.in/
Source:         http://znc.in/releases/znc-%{version}.tar.gz
Source1:        znc.init
# extra modules:
Source10:       http://znc-msvc.googlecode.com/svn-history/r321/trunk/flakes/twitter.cpp
Source11:       cap_sasl.cpp
# extra modules (via service tar_scm):
%define mod_colloquy_ver 1298334866
Source20:	colloquypush-%{mod_colloquy_ver}.tar.bz2
Summary:        Advanced IRC Bouncer

%description
ZNC is an IRC bounce with many advanced features like detaching, multiple
users, per channel playback buffer, SSL, IPv6, transparent DCC bouncing, and
c++ module support to name a few.

%package devel
Group:          Productivity/Networking/IRC
License:        GPL-2.0

Summary:        Development files to build modules for ZNC

%description devel
ZNC is an IRC bounce with many advanced features like detaching, multiple
users, per channel playback buffer, SSL, IPv6, transparent DCC bouncing, and
c++ module support to name a few.

This package holds the needed files to build modules for znc


%prep
%setup -a20
# extra module colloquy:
%__cp colloquypush-%{mod_colloquy_ver}/znc/colloquy.cpp modules/extra/
%__cp colloquypush-%{mod_colloquy_ver}/znc/README README.colloquy 
%__cp colloquypush-%{mod_colloquy_ver}/znc/AUTHORS AUTHORS.colloquy
# extra module twitter
%__cp %{S:10} modules/extra/
# extra module cap_sasl
%__cp %{S:11} modules/extra/


%build
%if 0%{?suse_version} > 1000
export CFLAGS="%{optflags} -fstack-protector-all"
export CXXFLAGS="%{optflags} -fstack-protector-all"
%endif

%configure --enable-extra \
%if 0%{?suse_version} > 1000
  --enable-sasl 
%endif

%{__make} %{?jobs:-j%jobs}

%install
make install DESTDIR=%{buildroot}
%{__install} -d -m 0755        %{buildroot}%{_var}/lib/%{name} %{buildroot}%{_sbindir}
%{__install} -D -m 0755 %{S:1} %{buildroot}/etc/init.d/%{name}
%{__ln_s} -f /etc/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 "znc irc bouncer" -d %{_var}/lib/%{name} %{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) /etc/init.d/%{name}
%{_sbindir}/rc%{name}
%{_bindir}/znc
%dir %{_libdir}/znc/
%{_libdir}/znc/admin.so
%{_libdir}/znc/adminlog.so
%{_libdir}/znc/antiidle.so
%{_libdir}/znc/autoattach.so
%{_libdir}/znc/autocycle.so
%{_libdir}/znc/autoop.so
%{_libdir}/znc/autoreply.so
%{_libdir}/znc/autovoice.so
%{_libdir}/znc/away.so
%{_libdir}/znc/awaynick.so
%{_libdir}/znc/blockuser.so
%{_libdir}/znc/block_motd.so
%{_libdir}/znc/bouncedcc.so
%{_libdir}/znc/buffextras.so
%{_libdir}/znc/cert.so
%{_libdir}/znc/certauth.so
%{_libdir}/znc/chansaver.so
%{_libdir}/znc/charset.so
%{_libdir}/znc/clearbufferonmsg.so
%{_libdir}/znc/clientnotify.so
%{_libdir}/znc/colloquy.so
%{_libdir}/znc/crypt.so
%{_libdir}/znc/ctcpflood.so
%{_libdir}/znc/dcc.so
%{_libdir}/znc/disconkick.so
%{_libdir}/znc/droproot.so
%{_libdir}/znc/email.so
%{_libdir}/znc/fail2ban.so
%{_libdir}/znc/fakeonline.so
%{_libdir}/znc/flooddetach.so
%{_libdir}/znc/identfile.so
%{_libdir}/znc/imapauth.so
%{_libdir}/znc/keepnick.so
%{_libdir}/znc/kickrejoin.so
%{_libdir}/znc/lastseen.so
%{_libdir}/znc/listsockets.so
%{_libdir}/znc/log.so
%{_libdir}/znc/motdfile.so
%{_libdir}/znc/nickserv.so
%{_libdir}/znc/notes.so
%{_libdir}/znc/notify_connect.so
%{_libdir}/znc/partyline.so
%{_libdir}/znc/perform.so
%{_libdir}/znc/q.so
%{_libdir}/znc/raw.so
%{_libdir}/znc/route_replies.so
%{_libdir}/znc/sample.so
%if 0%{?suse_version} > 1000
%{_libdir}/znc/saslauth.so
%endif
%{_libdir}/znc/savebuff.so
%{_libdir}/znc/schat.so
%{_libdir}/znc/send_raw.so
%{_libdir}/znc/shell.so
%{_libdir}/znc/simple_away.so
%{_libdir}/znc/stickychan.so
%{_libdir}/znc/twitter.so
%{_libdir}/znc/cap_sasl.so
%{_libdir}/znc/watch.so
%{_libdir}/znc/webadmin.so
%{_datadir}/znc/
%{_mandir}/man1/znc.1*
%attr(750,znc,znc) %{_var}/lib/%{name}
%doc AUTHORS AUTHORS.colloquy
%doc LICENSE LICENSE.OpenSSL 
%doc README.md README.colloquy

%files devel
%defattr(-,root,root,-)
%{_bindir}/znc-buildmod
%{_bindir}/znc-config
%{_includedir}/znc/
%{_libdir}/pkgconfig/znc.pc
%{_mandir}/man1/znc-buildmod.1*
%{_mandir}/man1/znc-config.1*

%changelog