File efax-gtk.spec of Package efax-gtk
#
# spec file for package efax-gtk
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011-2012 Malcolm Lewis malcolmlewis@opensuse.org
#
# 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: efax-gtk
Version: 3.2.13
Release: 0
Summary: GTK+ front end for the efax program
License: GPL-2.0+
Group: Productivity/Telephony/Clients
Url: http://efax-gtk.sourceforge.net/
Source0: http://superb-dca2.dl.sourceforge.net/project/efax-gtk/efax-gtk/%{version}/%{name}-%{version}.src.tgz
# PATCH-FIX-UPSTREAM efax-gtk-fix-desktop-file.patch sf#3579580 malcolmlewis@opensuse.org -- Correct desktop categories.
Patch0: efax-gtk-fix-desktop-file.patch
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: libsigc++2-devel
BuildRequires: libtiff-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(dbus-glib-1)
%if 0%{?favor_gtk2}
BuildRequires: gtk2-devel
BuildRequires: libcxx-gtk-utils-2-devel
%else
BuildRequires: gtk3-devel
BuildRequires: libcxx-gtk-utils-3-devel
%endif
# Note that efax-gtk comes with its own patched version of efax
# (see README), so we don't need a Requires on efax
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
efax-gtk is a GTK+ front end for the efax program. It can
be used to send and receive faxes with a fax modem, and to
view, print and manage faxes received.
It also has a socket interface to provide a "virtual
printer" for sending faxes from word processors and
similar programs, and can automatically e-mail a received
fax to a designated user, and automatically print a
received fax.
%lang_package
%prep
%setup -q
%patch0 -p1
# Fix "Your file uses __DATE and __TIME__ this causes the package to rebuild when not needed warning"
# We use the date from the changes file
set_date_time=`date --date "@\`stat --format %Y %{_sourcedir}/%{name}.changes\`" +"%B %Y %H:%M"`
sed -i 's/\"\_\_DATE\_\_ \" \" \_\_TIME\_\_/'"$set_date_time"'\"/g' efax/efax.c
%build
CFLAGS="%{optflags} -pthread -fno-strict-aliasing"
CXXFLAGS="%{optflags} -fexceptions -frtti -fsigned-char -fno-check-new -pthread"
%configure --with-spooldir=%{_libexecdir}/efax
make %{?_smp_mflags}
%install
%makeinstall
%suse_update_desktop_file %{name}
%find_lang %{name} %{?no_lang_C}
#Fix man page names
pushd %{buildroot}%{_mandir}/man1/
mv efax.1 efax-0.9a.1
mv efix.1 efix-0.9a.1
popd
%fdupes -s %{buildroot}
%post
%desktop_database_post
%postun
%desktop_database_postun
%files
%defattr(-,root,root)
%doc AUTHORS BUGS ChangeLog COPYING README
%config %{_sysconfdir}/efax-gtkrc
%{_bindir}/efax-0.9a
%{_bindir}/efix-0.9a
%{_bindir}/efax-gtk
%dir %attr(0775,lp,lp) %{_libexecdir}/efax
%{_libexecdir}/efax/efax-gtk-faxfilter
%{_libexecdir}/efax/efax-gtk-socket-client
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_mandir}/man1/efax-0.9a.1%{?ext_man}
%{_mandir}/man1/efix-0.9a.1%{?ext_man}
%{_mandir}/man1/efax-gtk.1%{?ext_man}
%files lang -f %{name}.lang
%changelog