-# TODO:
-# - install GNOME and KDE releated files (MIME files)
Summary: Gettext catalogs editor
-Summary(pl): Edytor katalogów gettexta
+Summary(pl.UTF-8): Edytor katalogów gettexta
Name: poedit
-Version: 1.2.4
-Release: 0.1
-License: BSD
-Group: Applications/Editors
-Source0: http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
-# Source0-md5: 24935b35ddb32c90fef4d0dee7a44a61
-Source1: %{name}.desktop
-Source2: %{name}.png
-Patch0: %{name}-system_libs.patch
-Patch1: %{name}-DESTDIR.patch
-URL: http://poedit.sourceforge.net/
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: gtk+2-devel
-BuildRequires: wxGTK2-unicode-devel >= 2.4.0-0.8
+Version: 3.3.2
+Release: 1
+License: MIT
+Group: X11/Applications/Editors
+Source0: https://github.com/vslavik/poedit/releases/download/v%{version}-oss/%{name}-%{version}.tar.gz
+# Source0-md5: 83b18a3e983c9444b31f1132a5039819
+URL: https://poedit.net/
+BuildRequires: autoconf >= 2.59
+BuildRequires: automake >= 1:1.9
+BuildRequires: boost-devel
+BuildRequires: gtk+3-devel
+BuildRequires: gtkspell3-devel
+BuildRequires: lucene++-devel >= 3.0.5
+BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.311
+BuildRequires: wxGTK3-unicode-devel >= 3.0.3
+BuildRequires: wxWidgets-utils
+Requires(post,postun): desktop-file-utils
+Requires(post,postun): gtk-update-icon-cache
+Requires(post,postun): hicolor-icon-theme
Requires: gettext
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
be used to create new catalogs or update existing catalogs from source
code by single click.
-%description -l pl
-poEdit jest wieloplatformowym edytorem katalogów gettexta (plików
-.po). U¿ywa toolkitu wxWindows, wiêc mo¿e dzia³aæ pod Uniksem oraz pod
-Windows. Mo¿liwo¶ci programu to: obs³uga UTF-8, pod¶wietlanie rekordów
-nie przet³umaczonych i niepewnych ("fuzzy"), pod¶wietlanie odstêpów,
-przegl±darka odwo³añ, edycja nag³ówków, tworzenie nowych katalogów
-oraz uaktualnianie istniej±cych z plików ¼ród³owych przez jedno
-klikniêcie.
+%description -l pl.UTF-8
+poEdit jest wieloplatformowym edytorem katalogów gettexta (plików
+.po). Używa toolkitu wxWindows, więc może działać pod Uniksem oraz pod
+Windows. Możliwości programu to: obsługa UTF-8, podświetlanie rekordów
+nie przetłumaczonych i niepewnych ("fuzzy"), podświetlanie odstępów,
+przeglądarka odwołań, edycja nagłówków, tworzenie nowych katalogów
+oraz uaktualnianie istniejących z plików źródłowych przez jedno
+kliknięcie.
%prep
%setup -q
-%patch0 -p1
-%patch1 -p1
%build
-%{__aclocal}
-%{__autoconf}
-%{__automake}
%configure \
- --disable-transmem \
- --with-wx-config=wxgtk2u-2.4-config \
- --%{?debug:en}%{!?debug:dis}able-debug
+ --with-wx-config=wx-gtk3-unicode-config \
+ --%{?debug:en}%{!?debug:dis}able-debug
-%{__make} \
- EXTRADIR="" \
- gizmoslib="-lwx_gtk2u_gizmos-2.4" \
- xrclib="-lwx_gtk2u_xrc-2.4" \
- expatlib="-lexpat"
+%{__make} V=1
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}}
-%{__make} install \
+%{__make} install V=1 \
DESTDIR=$RPM_BUILD_ROOT
-install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
-install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
+# fix/update locale names
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/co
+%{__mv} $RPM_BUILD_ROOT%{_localedir}/pt{_PT,}
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
+%post
+%update_desktop_database_post
+%update_icon_cache hicolor
+
+%postun
+%update_desktop_database_postun
+%update_icon_cache hicolor
+
%files -f %{name}.lang
%defattr(644,root,root,755)
-#%doc NEWS LICENSE README AUTHORS docs/*.html docs/img
+%doc AUTHORS COPYING NEWS README.md
%attr(755,root,root) %{_bindir}/poedit
%{_datadir}/poedit
-%{_datadir}/mime-info/%{name}*
-%{_desktopdir}/*
-%{_pixmapsdir}/*
-%{_mandir}/man1/*
+%{_desktopdir}/net.poedit.Poedit.desktop
+%{_desktopdir}/net.poedit.PoeditURI.desktop
+%{_metainfodir}/net.poedit.Poedit.appdata.xml
+%{_iconsdir}/hicolor/*/*/net.poedit.Poedit.png
+%{_iconsdir}/hicolor/*/*/net.poedit.Poedit.svg
+%{_mandir}/man1/poedit.1*