File poedit.spec of Package poedit
#
# spec file for package poedit
#
# Copyright (c) 2016 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 legacy_tm_migration
%bcond_without language_detection
%bcond_without crowdin_integration
Name: poedit
Version: 1.8.9
Release: 0
Summary: Cross-platform Gettext Catalogs 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
# PATCH-FEATURE-UPSTREAM https://github.com/vslavik/poedit/pull/286
Patch0: appdata.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: boost-devel >= 1.54
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: wxWidgets-devel >= 3.0.0
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
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with legacy_tm_migration}
BuildRequires: db-devel >= 4.7
BuildRequires: pkgconfig(expat)
%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 cross-platform gettext catalogs (.po files) editor.
It is built with wxWidgets toolkit and can run on any platform
supported by it. It aims to provide more convenient approach to
editing catalogs than launching vi and editing the file by hand.
%lang_package
%prep
%setup -q
%patch0 -p1
%build
autoreconf -fi
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
%configure \
%if !%{with legacy_tm_migration}
--disable-legacytm \
%endif
%if !%{with language_detection}
--without-cld2 \
%endif
%if !0%{with crowdin_integration}
--without-cpprest \
%endif
make %{?_smp_mflags} V=1
%install
%make_install
# remove MIME type icons conflicting with virtaal
rm %{buildroot}%{_datadir}/icons/hicolor/*/mimetypes/text-x-gettext-translation.*
%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)
%doc AUTHORS COPYING 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?/*
%if %{with legacy_tm_migration}
%{_libexecdir}/%{name}-dump-legacy-tm
%endif
%files lang -f %{name}.lang
%defattr(-,root,root,755)
%changelog