File irc-otr.spec of Package irc-otr

#
# spec file for package irc-otr
#
# Copyright (c) 2012 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:           irc-otr
Version:        0.3
Release:        0
Url:            http://irssi-otr.tuxfamily.org/
Summary:        Off-The-Record Messaging plugin for various irc clients
License:        GPL-2.0+
Group:          Productivity/Networking/Instant Messenger
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  cmake >= 2.4.7
BuildRequires:  gcc-c++
BuildRequires:  glib2-devel >= 2.12
BuildRequires:  irssi-devel
# Package does not build against libotr 4.0.0 in factory
%if 0%{?suse_version} > 1220
BuildRequires:  libotr2-devel >= 3.1.0
BuildConflicts:	libotr-devel >= 4.0.0
%else
BuildRequires:  libotr-devel >= 3.1.0
%endif
BuildRequires:  pkg-config
BuildRequires:  python >= 2.5
Source0:        irssi-otr-%{version}.tar.bz2
Source1:        http://www.xchat.org/docs/xchat-plugin.h
Patch0:         irc-otr-build-xchat-0.3.patch
# PATCH-FIX-OPENSUSE irssi-otr-0.3-cmake-2.8.8-bug13125-fix.patch andreas.stieger@gmx.de
Patch1:         irssi-otr-0.3-cmake-2.8.8-bug13125-fix.patch

%description
This package provides modules which implement Off-The-Record (OTR) Messaging
protocol for a number of popular IRC clients.

OTR allows you to have private conversations over IM by providing:

 - Encryption
   - No one else can read your instant messages.
 - Authentication
   - You are assured the correspondent is who you think it is.
 - Deniability
   - The messages you send do _not_ have digital signatures that are
     checkable by a third party.  Anyone can forge messages after a
     conversation to make them look like they came from you.  However,
     _during_ a conversation, your correspondent is assured the messages
     he sees are authentic and unmodified.
 - Perfect forward secrecy
   - If you lose control of your private keys, no previous conversation
     is compromised.

Authors:
--------
    Ulim <a.sporto+bee@gmail.com>

%package -n	irssi-otr
Summary:        Off-The-Record messaging plugin for irssi
Group:          Productivity/Networking/Instant Messenger
Requires:       irssi

%description -n	irssi-otr
This plugin adds Off-the-Record messaging support for the irssi IRC client.
Although primarily designed for use with the bitlbee IRC2IM gateway, it 
works within any query window, provided that the conversation partner's IRC 
client supports OTR.

OTR allows you to have private conversations over IM by providing:

 - Encryption
   - No one else can read your instant messages.
 - Authentication
   - You are assured the correspondent is who you think it is.
 - Deniability
   - The messages you send do _not_ have digital signatures that are
     checkable by a third party.  Anyone can forge messages after a
     conversation to make them look like they came from you.  However,
     _during_ a conversation, your correspondent is assured the messages
     he sees are authentic and unmodified.
 - Perfect forward secrecy
   - If you lose control of your private keys, no previous conversation
     is compromised.

Authors:
--------
    Ulim <a.sporto+bee@gmail.com>

%package -n	xchat-otr
Summary:        Off-The-Record messaging plugin for xchat
Group:          Productivity/Networking/Instant Messenger
Requires:       xchat

%description -n	xchat-otr
This plugin adds Off-the-Record messaging support for the xchat IRC client.
Although primarily designed for use with the bitlbee IRC2IM gateway, it 
works within any query window, provided that the conversation partner's IRC 
client supports OTR.

OTR allows you to have private conversations over IM by providing:

 - Encryption
   - No one else can read your instant messages.
 - Authentication
   - You are assured the correspondent is who you think it is.
 - Deniability
   - The messages you send do _not_ have digital signatures that are
     checkable by a third party.  Anyone can forge messages after a
     conversation to make them look like they came from you.  However,
     _during_ a conversation, your correspondent is assured the messages
     he sees are authentic and unmodified.
 - Perfect forward secrecy
   - If you lose control of your private keys, no previous conversation
     is compromised.

Authors:
--------
    Ulim <a.sporto+bee@gmail.com>


%prep
%setup -q -n irssi-otr-%{version}
%patch0 -p0
%patch1 -p0
mkdir xchat
%{__cp} %{SOURCE1} xchat/
ln -s xchat/xchat-plugin.h .

%build
export CFLAGS="$RPM_OPT_FLAGS"
cmake -DCMAKE_INSTALL_PREFIX="%{_prefix}" -DDOCDIR="%{_docdir}/%{name}" -DLIB_SUFFIX="$(echo %_lib | cut -b4-)" .
%{__make}

%install
%{__make} install DESTDIR="$RPM_BUILD_ROOT"
%{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name} ./installed-docs

%clean
%{__rm} -rf "$RPM_BUILD_ROOT"

%files -n irssi-otr
%defattr(-,root,root)
%doc installed-docs/*
%{_libdir}/irssi/modules/libotr.so

%files -n xchat-otr
%defattr(-,root,root)
%doc installed-docs/* README.xchat
%dir %{_libdir}/xchat
%dir %{_libdir}/xchat/plugins
%{_libdir}/xchat/plugins/libxchatotr.so

%changelog
openSUSE Build Service is sponsored by