File psi.spec of Package psi

#
# spec file for package psi (Version 0.14)
#
# Copyright (c) 2010 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/
#

# norootforbuild

%define otrplugin_version 0.5

Name:           psi
Url:            http://psi-im.org/
License:        GPLv2+
Group:          Productivity/Networking/Talk/Clients
Version:        0.14
Release:        3
Summary:        Jabber client using Qt
Source:         http://downloads.sourceforge.net/psi/%{name}-%{version}.tar.bz2
# OTR support: http://public.beuth-hochschule.de/~s30935/
# http://public.beuth-hochschule.de/~s30935/files/psi-otr-0.5.tar.gz
Source1:        psi-otr-%{otrplugin_version}.tar.bz2
Source30:       http://psi-im.org/download/lang/psi_be.qm
Source31:       http://psi-im.org/download/lang/qt_be.qm
Source32:       http://psi-im.org/download/lang/psi_cs.qm
Source33:       http://psi-im.org/download/lang/psi_de.qm
Source34:       http://psi-im.org/download/lang/qt_de.qm
Source35:       http://psi-im.org/download/lang/psi_es.qm
Source36:       http://psi-im.org/download/lang/qt_es.qm
Source37:       http://psi-im.org/download/lang/psi_fr.qm
Source38:       http://psi-im.org/download/lang/qt_fr.qm
Source39:       http://psi-im.org/download/lang/psi_it.qm
Source40:       http://psi-im.org/download/lang/psi_ja.qm
Source41:       http://psi-im.org/download/lang/psi_mk.qm
Source42:       http://psi-im.org/download/lang/qt_mk.qm
Source43:       http://psi-im.org/download/lang/psi_pl.qm
Source44:       http://psi-im.org/download/lang/qt_pl.qm
Source45:       http://psi-im.org/download/lang/psi_pt_BR.qm
Source46:       http://psi-im.org/download/lang/psi_ru.qm
Source47:       http://psi-im.org/download/lang/qt_ru.qm
Source48:       http://psi-im.org/download/lang/psi_sl.qm
Source49:       http://psi-im.org/download/lang/psi_sv.qm
Source50:       http://psi-im.org/download/lang/qt_sv.qm
Source51:       http://psi-im.org/download/lang/psi_ur_PK.qm
Source52:       http://psi-im.org/download/lang/qt_ur_PK.qm
Source53:       http://psi-im.org/download/lang/psi_zh_TW.qm
Patch0:         %{name}-0.14-enable_otr.patch
Patch1:         %{name}-0.14-whiteboarding.patch
Patch2:         %{name}-0.14-mpris.patch
Patch3:         %{name}-0.14-sxe-debug.patch
Patch4:         %{name}-0.14-desktop_file.patch
Patch5:         %{name}-0.14-signing-presence-optional.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  aspell-devel
BuildRequires:  libqca2-devel
BuildRequires:  libqt4-devel
BuildRequires:  libotr-devel
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
Recommends:     psimedia >= 1.0.3

%description
Psi is the premiere Instant Messaging application designed for
GNU/Linux, Microsoft Windows, Apple Mac OS X. Built upon an open
protocol named Jabber, Psi is a fast and lightweight messaging client
that utilises the best in open source technologies. Psi contains all
the features necessary to chat, with no bloated extras that slow your
computer down.

This package contains a plugin for "off the record" encryption (OTR).

Authors:
--------
    Justin Karneges <infiniti@affinix.com>
    Kevin Smith <psi-changelog@kismith.co.uk>
    Michail Pishchagin <mblsha@users.sourceforge.net>
    Remko Troncon <remko@psi-im.org>
    Maciej Niedzielski

%prep
%setup -q -a 1
%patch0 -p1
%patch1
%patch2
%patch3
%patch4
%patch5 -p1

%build
# do not use %%configure - not real configure script
export QMAKE_CXXFLAGS="%{optflags}"
./configure --prefix=%{_prefix} --libdir=%{_libdir} --disable-bundled-qca --enable-plugins --debug --no-separate-debug-info
make %{?jobs:-j%jobs}
pushd psi-otr-%{otrplugin_version}
mv README README.OTR
qmake 
make %{?jobs:-j%jobs}
popd

%install
make INSTALL_ROOT=%{buildroot} install
rm -f %{buildroot}%{_datadir}/psi/{COPYING,README}
%suse_update_desktop_file psi
install -m 0644 -t %{buildroot}%{_datadir}/%{name} $RPM_SOURCE_DIR/*.qm
mkdir -p %{buildroot}%{_libdir}/%{name}/plugins
install -m 0644 psi-otr-%{otrplugin_version}/libpsi-otr.so  %{buildroot}%{_libdir}/%{name}/plugins/
%fdupes %{buildroot}%{_datadir}

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING README psi-otr-%{otrplugin_version}/README.OTR
%{_bindir}/psi
%{_datadir}/applications/psi.desktop
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/16x16
%dir %{_datadir}/icons/hicolor/16x16/apps
%dir %{_datadir}/icons/hicolor/32x32
%dir %{_datadir}/icons/hicolor/32x32/apps
%dir %{_datadir}/icons/hicolor/48x48
%dir %{_datadir}/icons/hicolor/48x48/apps
%dir %{_datadir}/icons/hicolor/64x64
%dir %{_datadir}/icons/hicolor/64x64/apps
%dir %{_datadir}/icons/hicolor/128x128
%dir %{_datadir}/icons/hicolor/128x128/apps
%{_datadir}/icons/hicolor/*/apps/psi.png
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/libpsi-otr.so
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/certs
%{_datadir}/%{name}/iconsets
%{_datadir}/%{name}/sound
%lang(be) %{_datadir}/%{name}/*_be.qm
%lang(cs) %{_datadir}/%{name}/*_cs.qm
%lang(de) %{_datadir}/%{name}/*_de.qm
%lang(es) %{_datadir}/%{name}/*_es.qm
%lang(fr) %{_datadir}/%{name}/*_fr.qm
%lang(it) %{_datadir}/%{name}/*_it.qm
%lang(ja) %{_datadir}/%{name}/*_ja.qm
%lang(mk) %{_datadir}/%{name}/*_mk.qm
%lang(pl) %{_datadir}/%{name}/*_pl.qm
%lang(pt_BR) %{_datadir}/%{name}/*_pt_BR.qm
%lang(ru) %{_datadir}/%{name}/*_ru.qm
%lang(sl) %{_datadir}/%{name}/*_sl.qm
%lang(sv) %{_datadir}/%{name}/*_sv.qm
%lang(ur_PK) %{_datadir}/%{name}/*_ur_PK.qm
%lang(zh_TW) %{_datadir}/%{name}/*_zh_TW.qm

%changelog