File balsa.spec of Package balsa
#
# spec file for package balsa
#
# Copyright (c) 2013 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: balsa
%define TOUCHSCREEN_OPTIMIZATION %(echo %{name} | grep -qv touchscreen ; echo $?)
%define base_name balsa
Version: 2.5.1
Release: 0
Summary: The GNOME Mail Program
License: GPL-2.0+
Group: Productivity/Networking/Email/Clients
Url: http://pawsa.fedorapeople.org/balsa/
Source: http://pawsa.fedorapeople.org/balsa/%{name}-%{version}.tar.bz2
BuildRequires: compface
BuildRequires: fdupes
BuildRequires: gpgme-devel
BuildRequires: intltool
BuildRequires: krb5-devel
BuildRequires: libesmtp-devel
BuildRequires: openldap2-devel
BuildRequires: openssl-devel
BuildRequires: translation-update-upstream
BuildRequires: update-desktop-files
BuildRequires: yelp-tools
BuildRequires: pkgconfig(enchant)
BuildRequires: pkgconfig(glib-2.0) >= 2.27.0
BuildRequires: pkgconfig(gmime-2.6)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(gtksourceview-3.0)
BuildRequires: pkgconfig(gtkspell3-3.0)
BuildRequires: pkgconfig(libcanberra-gtk3)
BuildRequires: pkgconfig(libnm-glib)
BuildRequires: pkgconfig(libnotify)
BuildRequires: pkgconfig(libsecret-1)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(unique-1.0)
BuildRequires: pkgconfig(webkit2gtk-3.0)
Recommends: %{base_name}-lang
%if "%{name}" != "%{base_name}"
Conflicts: %{base_name}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# lang packages are exactly equal for both balsa variants. Build it only once:
%if "%{name}" == "%{base_name}"
%define BUILD_LANG 1
%else
%define BUILD_LANG 0
%endif
%description
Nice GUI program to manage e-mail.
%if %BUILD_LANG
%lang_package
%endif
%prep
%setup -q -n %{base_name}-%{version}
translation-update-upstream
%build
%configure\
%if %TOUCHSCREEN_OPTIMIZATION
--enable-touch-ui\
%endif
--disable-scrollkeeper\
--enable-more-warnings\
--enable-smime\
--with-canberra\
--with-ldap\
--with-gpgme\
--with-gtkspell\
--with-gtksourceview\
--with-sqlite\
--with-rubrica\
--with-ssl\
--with-gss\
--with-compface\
--with-unique\
--with-html-widget=webkit2
make %{?_smp_mflags}
%install
%makeinstall
%suse_update_desktop_file -G "Mail Client" %{base_name}
%suse_update_desktop_file -G "Mail Client" %{base_name}-mailto-handler
%if %BUILD_LANG
%find_lang %{base_name} %{?no_lang_C}
%else
rm -r %{buildroot}%{_datadir}/locale %{buildroot}%{_datadir}/omf %{buildroot}%{_datadir}/gnome/help
rmdir %{buildroot}%{_datadir}/gnome
%endif
%fdupes %{buildroot}%{_datadir}
%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 README COPYING ChangeLog NEWS TODO AUTHORS HACKING
%doc docs/mh-mail-HOWTO docs/vconvert.awk docs/pine2vcard
%doc %{_datadir}/help/C/%{name}/
%{_bindir}/*
%{_datadir}/applications/*.desktop
%{_datadir}/balsa/
%{_datadir}/icons/hicolor/48x48/mimetypes/*.png
%{_datadir}/pixmaps/*.png
%{_datadir}/sounds/balsa
%doc %{_mandir}/man1/balsa.1*
%dir %{_sysconfdir}/sound
%dir %{_sysconfdir}/sound/events
%config %{_sysconfdir}/sound/events/*.soundlist
%if %BUILD_LANG
%files lang -f %{base_name}.lang
%endif
%changelog