File claws-mail.spec of Package claws-mail.1005

#
# spec file for package claws-mail
#
# 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:           claws-mail
Version:        3.7.8
Release:        0
Url:            http://www.claws-mail.org/
Summary:        A lightweight and highly configurable email client
License:        GPL-3.0+
Group:          Productivity/Networking/Email/Clients
Source0:        http://prdownloads.sourceforge.net/sylpheed-claws/%{name}-%{version}.tar.bz2
Patch0:         claws-mail-python.diff
Patch1:         claws-mail-desktop.diff
# PATCH-FIX-UPSTREAM claws-mail-3.8.1-procmime-vuln.patch bnc#784463 -- NULL pointer derefence while processing email content. 
Patch2:         claws-mail-3.8.1-procmime-vuln.patch
BuildRequires:  NetworkManager-devel
BuildRequires:  compface
BuildRequires:  db-devel
BuildRequires:  docbook-utils
BuildRequires:  enchant-devel
BuildRequires:  fdupes
BuildRequires:  gettext
BuildRequires:  gmp-devel
BuildRequires:  gnutls-devel
BuildRequires:  gpgme-devel
BuildRequires:  gtk2-devel
BuildRequires:  libetpan-devel >= 0.57
BuildRequires:  openldap2-devel
BuildRequires:  pilot-link-devel
BuildRequires:  pkgconfig
BuildRequires:  startup-notification-devel
BuildRequires:  update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       pinentry-gtk2
Recommends:     %{name}-lang
Provides:       sylpheed-claws = %{version}
Obsoletes:      sylpheed-claws < %{version}

%description
Claws Mail (previously known as Sylpheed-Claws) is a lightweight and
highly configurable email client and news reader based on the GTK+ GUI
toolkit, it runs on the X Window System.

Claws Mail is free software distributed under the GNU GPL.

To run Claws Mail use 'claws-mail' on the command line.

When claws-mail is executed for the first time a configuration 'Wizard'
will appear prompting you for the minimum information necessary to
create a new account.

%package devel
Summary:        A lightweight and highly configurable email client
License:        GPL-2.0+
Group:          Development/Libraries/Other
Provides:       claws-mail:/usr/include/claws-mail/main.h
Requires:       claws-mail = %{version}
Requires:       enchant-devel
Requires:       glib2-devel
Requires:       gnutls-devel
Requires:       gpgme-devel
Requires:       gtk2-devel
Requires:       libetpan-devel
Requires:       openldap2-devel

%description devel
Claws Mail (previously known as Sylpheed-Claws) is a lightweight and
highly configurable email client and news reader based on the GTK+ GUI
toolkit, it runs on the X Window System.

Claws Mail is free software distributed under the GNU GPL.

To run Claws Mail use 'claws-mail' on the command line.

When claws-mail is executed for the first time a configuration 'Wizard'
will appear prompting you for the minimum information necessary to
create a new account.

%lang_package
%prep
%setup -q
%patch0
%patch1 -p1
%patch2 -p1

%build
%configure \
        --docdir=%{_datadir}/claws-mail \
        --disable-static \
        --enable-ldap \
        --enable-ipv6 \
        --enable-openssl \
        --enable-jpilot \
        --enable-spamassassin-plugin \
        --enable-dillo-viewer-plugin \
        --enable-trayicon-plugin \
        --enable-pgpcore-plugin \
        --enable-pgpmime-plugin \
        --enable-pgpinline-plugin \
        --disable-demo-plugin \
        --enable-crash-dialog \
        --enable-startup-notification \
        --enable-compface \
        --enable-libetpan
%__make %{?jobs:-j%jobs}

%install
%makeinstall
# Clean up
%__rm %{buildroot}%{_libdir}/claws-mail/plugins/*.la
# install desktop file
%suse_update_desktop_file -G "Email client" claws-mail
# we want to have the icon installed in /usr/share/pixmaps
%__mkdir_p %{buildroot}%{_datadir}/pixmaps/
%__cp claws-mail-64x64.png %{buildroot}%{_datadir}/pixmaps/
# Tools
%__cp -r tools %{buildroot}%{_datadir}/%{name}
%__rm %{buildroot}%{_datadir}/claws-mail/tools/Makefile*
%__mv %{buildroot}%{_datadir}/claws-mail/tools/README ./README.tools
# fixing permissions
%__chmod 755 %{buildroot}%{_datadir}/claws-mail/tools/*
%__chmod 644 %{buildroot}%{_datadir}/claws-mail/tools/multiwebsearch.conf
%__chmod 644 %{buildroot}%{_datadir}/claws-mail/tools/ca-certificates.crt
%find_lang %{name} %{?no_lang_C}
%fdupes %{buildroot}%{_libdir}/%{name}/plugins/
%__install -d %{buildroot}%{_sysconfdir}/skel/.claws-mail/
cat <<EOF > %{buildroot}%{_sysconfdir}/skel/.claws-mail/clawsrc
[Plugins_GTK2]
%{_libdir}/claws-mail/plugins/pgpcore.so
%{_libdir}/claws-mail/plugins/pgpinline.so
%{_libdir}/claws-mail/plugins/pgpmime.so
%{_libdir}/claws-mail/plugins/smime.so
EOF

%clean
%__rm -rf %{buildroot}

%if 0%{?suse_version} > 1130

%post
%desktop_database_post
%icon_theme_cache_post
%endif

%if 0%{?suse_version} > 1130

%postun
%desktop_database_postun
%icon_theme_cache_postun
%endif

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README README.tools TODO
%{_bindir}/claws-mail
%{_bindir}/sylpheed-claws
%dir %{_libdir}/claws-mail
%dir %{_libdir}/claws-mail/plugins
%{_libdir}/claws-mail/plugins/*.so
%{_libdir}/claws-mail/plugins/*.deps
%{_datadir}/applications/claws-mail.desktop
%{_datadir}/icons/hicolor/*/apps/claws-mail.png
%{_datadir}/pixmaps/claws-mail-64x64.png
%dir %{_datadir}/claws-mail
%doc %{_datadir}/claws-mail/RELEASE_NOTES
%doc %{_datadir}/claws-mail/manual/
%dir %{_datadir}/claws-mail/tools
%{_datadir}/claws-mail/tools/*.sh
%{_datadir}/claws-mail/tools/*.pl
%{_datadir}/claws-mail/tools/*.py
%{_datadir}/claws-mail/tools/*.conf
%{_datadir}/claws-mail/tools/ca-certificates.crt
%{_datadir}/claws-mail/tools/tb2claws-mail
%{_datadir}/claws-mail/tools/u*
%{_datadir}/claws-mail/tools/kdeservicemenu/
%{_mandir}/man1/claws-mail.1.gz
%config(noreplace) %{_sysconfdir}/skel/.claws-mail/

%files devel
%defattr(-,root,root)
%{_includedir}/claws-mail/
%{_libdir}/pkgconfig/claws-mail.pc

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by