LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

#
# spec file for package znc
#
# Copyright (c) 2015 SUSE LINUX 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:        1.6.1
Release:        0
Summary:        Advanced IRC Bouncer
License:        Apache-2.0
Group:          Productivity/Networking/IRC
Url:            http://en.znc.in/
Source0:        http://znc.in/releases/%{name}-%{version}.tar.gz
Source1:        http://znc.in/releases/%{name}-%{version}.tar.gz.sig
Source2:        %{name}.keyring
BuildRequires:  gcc-c++
BuildRequires:  perl
BuildRequires:  pkgconfig
BuildRequires:  systemd-rpm-macros
BuildRequires:  pkgconfig(icu-uc)
BuildRequires:  pkgconfig(libssl)
BuildRequires:  pkgconfig(python3)
BuildRequires:  pkgconfig(systemd)
BuildRequires:  pkgconfig(tcl)
BuildRequires:  pkgconfig(zlib)
%if 0%{?suse_version} == 1310
BuildRequires:  cyrus-sasl-devel
%else
BuildRequires:  pkgconfig(libsasl2)
%endif
Requires(pre):  shadow
Provides:       %{name}-extra = %{version}
Obsoletes:      %{name}-extra < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%systemd_requires

%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
Summary:        Development files to build modules for ZNC
Group:          Development/Libraries/Other

%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 contains the %{name} development headers for developing modules.

%package perl
Summary:        Perl support for ZNC
Group:          Productivity/Networking/IRC
Requires:       %{name} = %{version}
Requires:       perl >= 5.10

%description perl
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 contains the %{name} Perl extension.

%package python3
Summary:        Python support for ZNC
Group:          Productivity/Networking/IRC
Requires:       %{name} = %{version}
Requires:       python3
Provides:       %{name}-python = %{version}
Obsoletes:      %{name}-python < %{version}

%description python3
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 contains the %{name} Python extension.

%package tcl
Summary:        TCL support for ZNC
Group:          Productivity/Networking/IRC
Requires:       %{name} = %{version}
Requires:       tcl

%description tcl
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 contains the %{name} Tcl extension.

%prep
%setup -q

%build
export CFLAGS="%{optflags} -fstack-protector-all"
export CXXFLAGS="%{optflags} -fstack-protector-all"
%configure --enable-cyrus \
     	   --enable-perl \
	   --enable-tcl \
	   --with-tcl=%{_libdir} \
	   --enable-python \
	   --with-systemdsystemunitdir=%{_unitdir}

make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
install -d -m 0755 %{buildroot}%{_var}/lib/%{name} %{buildroot}%{_sbindir}
ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}

%pre
getent group  %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || useradd -r -g %{name} -s /bin/false -c "znc irc bouncer" -d %{_var}/lib/%{name} %{name}

%service_add_pre %{name}.service

%post
%service_add_post %{name}.service

%preun
%service_del_preun %{name}.service

%postun
%service_del_postun %{name}.service

%files
%defattr(-,root,root,-)
%doc AUTHORS LICENSE README.md
%{_unitdir}/%{name}.service
%{_sbindir}/rc%{name}
%{_bindir}/%{name}
%dir %{_libdir}/%{name}/
%{_libdir}/%{name}/autoattach.so
%{_libdir}/%{name}/alias.so
%{_libdir}/%{name}/autocycle.so
%{_libdir}/%{name}/autoop.so
%{_libdir}/%{name}/awaynick.so
%{_libdir}/%{name}/bouncedcc.so
%{_libdir}/%{name}/chansaver.so
%{_libdir}/%{name}/clientnotify.so
%{_libdir}/%{name}/crypt.so
%{_libdir}/%{name}/dcc.so
%{_libdir}/%{name}/fail2ban.so
%{_libdir}/%{name}/identfile.so
%{_libdir}/%{name}/imapauth.so
%{_libdir}/%{name}/keepnick.so
%{_libdir}/%{name}/kickrejoin.so
%{_libdir}/%{name}/nickserv.so
%{_libdir}/%{name}/partyline.so
%{_libdir}/%{name}/perform.so
%{_libdir}/%{name}/q.so
%{_libdir}/%{name}/raw.so
%{_libdir}/%{name}/sample.so
%{_libdir}/%{name}/savebuff.so
%{_libdir}/%{name}/schat.so
%{_libdir}/%{name}/shell.so
%{_libdir}/%{name}/simple_away.so
%{_libdir}/%{name}/stickychan.so
%{_libdir}/%{name}/watch.so
%{_libdir}/%{name}/webadmin.so
%{_libdir}/%{name}/awaystore.so
%{_libdir}/%{name}/controlpanel.so
%{_libdir}/%{name}/cyrusauth.so
%{_libdir}/%{name}/missingmotd.so
%{_libdir}/%{name}/modules_online.so
%{_libdir}/%{name}/sasl.so
%{_libdir}/%{name}/adminlog.so
%{_libdir}/%{name}/autoreply.so
%{_libdir}/%{name}/autovoice.so
%{_libdir}/%{name}/block_motd.so
%{_libdir}/%{name}/blockuser.so
%{_libdir}/%{name}/buffextras.so
%{_libdir}/%{name}/cert.so
%{_libdir}/%{name}/certauth.so
%{_libdir}/%{name}/clearbufferonmsg.so
%{_libdir}/%{name}/ctcpflood.so
%{_libdir}/%{name}/disconkick.so
%{_libdir}/%{name}/flooddetach.so
%{_libdir}/%{name}/lastseen.so
%{_libdir}/%{name}/listsockets.so
%{_libdir}/%{name}/log.so
%{_libdir}/%{name}/notes.so
%{_libdir}/%{name}/notify_connect.so
%{_libdir}/%{name}/route_replies.so
%{_libdir}/%{name}/send_raw.so
%{_datadir}/%{name}/
%{_mandir}/man1/%{name}.1*
%attr(750,%{name},%{name}) %{_var}/lib/%{name}

%files perl
%defattr(-,root,root,-)
%doc AUTHORS LICENSE README.md
%{_libdir}/%{name}/modperl.so
%dir %{_libdir}/%{name}/modperl/
%{_libdir}/%{name}/modperl/ZNC.pm
%{_libdir}/%{name}/modperl/ZNC.so
%{_libdir}/%{name}/modperl/startup.pl
%{_libdir}/%{name}/perleval.pm

%files python3
%defattr(-,root,root,-)
%{_libdir}/%{name}/modpython.so
%dir %{_libdir}/%{name}/modpython/
%{_libdir}/%{name}/modpython/_znc_core.so
%{_libdir}/%{name}/modpython/znc.py
%{_libdir}/%{name}/modpython/znc_core.py
%doc AUTHORS LICENSE README.md

%files tcl
%defattr(-,root,root,-)
%doc AUTHORS LICENSE README.md
%{_libdir}/%{name}/modtcl.so

%files devel
%defattr(-,root,root,-)
%doc AUTHORS LICENSE README.md
%{_bindir}/znc-buildmod
%{_includedir}/%{name}/
%{_libdir}/pkgconfig/znc.pc
%{_mandir}/man1/znc-buildmod.1*

%changelog