File vacuum-im.spec of Package vacuum-im

# spec file for package vacuum-im
# 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

%define sname vacuum
%define rbuild 1680

Name:           %{sname}-im
Summary:        Crossplatform Jabber client written on Qt
License:        GPL-3.0
Group:          Productivity/Networking/Instant Messenger 
Version:        1.1.2
Release:        0
%if 0%{?suse_version} < 1120
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         %{sname}-%{version}.tar.bz2
BuildRequires:  cmake >= 2.8
BuildRequires:  fdupes
BuildRequires:  libQtWebKit-devel
BuildRequires:  libqt4-devel
BuildRequires:  openssl-devel
BuildRequires:  update-desktop-files
Recommends:     vacuum-im-plugins-spellchecker

The core program is just a plugin loader - all functionality is made
available via plugins. This enforces modularity and ensures well defined
component interaction via interfaces.

%define libname libvacuumutils1_7

%package -n %{libname}

Summary:        Shared library libvacuumutils for Vacuum-IM
Group:          System/Libraries

%description -n %{libname}
This package includes shared libraris needed to work Vacuum-IM program.

%package devel
Summary:        Development Files for Vacuum-IM
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}
Requires:       %{name} = %{version}

%description devel
This package includes files needed to develop Vacuum-IM modules.

%setup -q -n %{name}
sed -i 's/\r$//' AUTHORS
sed -i 's/\r$//' COPYING
sed -i 's/\r$//' README
sed -i 's/\r$//' INSTALL
sed -i 's/\r$//' CHANGELOG

%{__mkdir} build
cd build
%{__make} %{?_smp_mflags}

pushd build
DESTDIR=%{buildroot} %{make_install}
%{__install} -D -m644 resources/menuicons/shared/mainwindowlogo128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
%{__install} -D -m644 resources/menuicons/shared/mainwindowlogo96.png %{buildroot}%{_datadir}/icons/hicolor/96x96/apps/%{name}.png
%{__install} -D -m644 resources/menuicons/shared/mainwindowlogo64.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
%{__install} -D -m644 resources/menuicons/shared/mainwindowlogo48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{__install} -D -m644 resources/menuicons/shared/mainwindowlogo32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{__install} -D -m644 resources/menuicons/shared/mainwindowlogo24.png %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/%{name}.png
%{__install} -D -m644 resources/menuicons/shared/mainwindowlogo16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
sed  "s/Exec=%{sname}/Exec=%{name}/;s/Icon=%{sname}/Icon=%{name}/" %{buildroot}%{_datadir}/applications/%{sname}.desktop > %{buildroot}%{_datadir}/applications/%{name}.desktop
rm -f %{buildroot}%{_datadir}/applications/%{sname}.desktop
mv %{buildroot}%{_datadir}/pixmaps/%{sname}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
mv %{buildroot}%{_bindir}/%sname %{buildroot}%{_bindir}/%{name}
%suse_update_desktop_file -c %{name} "Vacuum-IM" "Jabber Client" %{name} %{name}.png Network InstantMessaging
#fix: Installed (but unpackaged) file(s) found
rm -rf %{buildroot}%{_datadir}/doc

%fdupes %{buildroot}%{_datadir}

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%dir %{_libdir}/%{sname}
%dir %{_libdir}/%{sname}/plugins
%dir %{_datadir}/%{sname}
%dir %{_datadir}/%{sname}/resources
%dir %{_datadir}/%{sname}/translations
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/*
%dir %{_datadir}/icons/hicolor/*/apps

%files -n %{libname}

%files devel