File filezilla.spec of Package filezilla

#
# spec file for package filezilla
#
# Copyright (c) 2018 SUSE LINUX 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:           filezilla
Version:        3.31.0
Release:        0
Summary:        A GUI FTP and SFTP Client
License:        GPL-2.0+
Group:          Productivity/Networking/Ftp/Clients
Url:            https://filezilla-project.org/
Source0:        http://download.filezilla-project.org/client/FileZilla_%{version}_src.tar.bz2
# PATCH-FIX-OPENSUSE filezilla-3.22.2-buildinfo-no-date.patch
Patch1:         filezilla-3.22.2-buildinfo-no-date.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  libtool
# needs long long support in pugixml
BuildRequires:  pugixml-devel >= 1.7
BuildRequires:  update-desktop-files
BuildRequires:  wxWidgets-3_0-devel >= 3.0.3
BuildRequires:  xdg-utils
BuildRequires:  pkgconfig(cppunit)
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(gnutls) >= 3.4.15
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(libfilezilla) >= 0.12.1
BuildRequires:  pkgconfig(libidn)
BuildRequires:  pkgconfig(nettle) >= 3.1
# filezilla-team use BuildRequires:  pkgconfig(sqlite3) >= 3.11.1
BuildRequires:  pkgconfig(sqlite3) >= 3.7.8
Recommends:     %{name}-lang
%if 0%{?suse_version} <= 1500
# FileZilla requires C++14 support.
BuildRequires:  gcc7-c++
%else
BuildRequires:  gcc-c++
%endif
# See boo#966384 filezilla fails to start
Requires:       libpugixml1 >= 1.7

%description
FileZilla is a modern and powerful FTP client.
FileZilla development focuses on high usability while also
supporting as many useful features as possible.

Some of the main features are:
 * Continuing interrupted up-/downloads.
 * Managing different FTP sites.
 * Modifiable Commands.
 * Keep-Alive-System.
 * Timeout detection.
 * Firewall support.
 * SOCKS4/5 and HTTP 1.1 proxy support.
 * SSL support (secure connections).
 * SFTP support.
 * Upload/Download queue.
 * Drag&Drop support.

%lang_package

%prep
%setup -q
%patch1 -p1

# Fix invalid translation locales:
cd locales
for LOC in\
    bg_BG\
    ca_ES@valencia\
    cs_CZ\
    fa_IR\
    fi_FI\
    gl_ES\
    he_IL\
    hu_HU\
    id_ID\
    ja_JP\
    km_KH\
    ko_KR\
    lo_LA\
    lt_LT\
    lv_LV\
    mk_MK\
    nb_NO\
    nn_NO\
    pl_PL\
    pt_BR\
    pt_PT\
    ro_RO\
    sk_SK\
    sl_SI\
    th_TH\
    uk_UA\
    vi_VN\
    zh_CN\
    zh_TW;
do
    mv -iv $LOC.po ${LOC/_??}.po
done

%build
%if 0%{?suse_version} <= 1500
export CC="gcc-7"
export CXX="g++-7"
# Default ABI through G++4.9, thus the one wxWidgets uses.
export CXXFLAGS="%{optflags} -fabi-version=2 -fabi-compat-version=2"
%endif
autoreconf -fi
%configure \
  --disable-static            \
  --disable-manualupdatecheck \
  --disable-autoupdatecheck   \
  --with-dbus
make %{?_smp_mflags}

%install
%make_install
%suse_update_desktop_file %{name}
%fdupes %{buildroot}%{_datadir}/
%find_lang %{name}

%check
make check %{?_smp_mflags}

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc README NEWS COPYING
%{_bindir}/%{name}
%{_bindir}/fzsftp
%{_bindir}/fzputtygen
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/icons/hicolor/480x480
%{_datadir}/icons/hicolor/480x480/apps
%{_datadir}/pixmaps/%{name}.png
%dir %{_datadir}/appdata/
%{_datadir}/appdata/%{name}.appdata.xml
%{_mandir}/man1/filezilla.1%{?ext_man}
%{_mandir}/man1/fzputtygen.1%{?ext_man}
%{_mandir}/man1/fzsftp.1%{?ext_man}
%{_mandir}/man5/fzdefaults.xml.5%{?ext_man}

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by