File poedit.spec of Package poedit

#
# spec file for package poedit
#
# 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/
#


%bcond_without language_detection
%bcond_without crowdin_integration
Name:           poedit
Version:        2.0.7
Release:        0
Summary:        Gettext Catalog Editing Tool
License:        MIT
Group:          Development/Tools/Other
Url:            http://www.poedit.net/
Source:         https://github.com/vslavik/poedit/releases/download/v%{version}-oss/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  wxWidgets-3_0-devel
BuildRequires:  wxWidgets-devel >= 3.0.3
BuildRequires:  pkgconfig(gtkspell-2.0)
BuildRequires:  pkgconfig(icu-i18n)
BuildRequires:  pkgconfig(icu-uc)
BuildRequires:  pkgconfig(liblucene++) >= 3.0.5
Requires:       gettext-tools
Recommends:     %{name}-lang
%if 0%{?suse_version} > 1325
BuildRequires:  libboost_iostreams-devel >= 1.60
BuildRequires:  libboost_regex-devel >= 1.60
BuildRequires:  libboost_system-devel >= 1.60
BuildRequires:  libboost_thread-devel >= 1.60
%else
BuildRequires:  boost-devel >= 1.60
%endif
%if %{with language_detection}
BuildRequires:  cld2-devel
%endif
%if %{with crowdin_integration}
BuildRequires:  cpprest-devel >= 2.5.0
BuildRequires:  pkgconfig(libsecret-1)
%endif

%description
poEdit is an editor for gettext catalogs (.po files). It is built
with the wxWidgets toolkit, providing a graphical approach to
editing catalogs over launching vi and editing the file by hand.

%lang_package

%prep
%setup -q

%build
%configure \
%if !%{with language_detection}
	--without-cld2 \
%endif
%if !0%{with crowdin_integration}
	--without-cpprest \
%endif

make %{?_smp_mflags} V=1

%install
%make_install

%suse_update_desktop_file %{name}
%fdupes -s %{buildroot}%{_datadir}
%find_lang %{name}

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root,755)
%license COPYING
%doc AUTHORS NEWS README
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/applications/%{name}-uri.desktop
%dir %{_datadir}/appdata/
%{_datadir}/appdata/poedit.appdata.xml
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/pixmaps/%{name}.png
%{_mandir}/man?/*

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

%changelog
openSUSE Build Service is sponsored by