Blob Blame History Raw
Name:           poedit
Version:        1.3.9
Release:        1%{?dist}
Summary:        GUI editor for GNU gettext .po files

Group:          Development/Languages
License:        MIT
URL:            http://www.poedit.net/
Source0:        http://download.sourceforge.net/poedit/poedit-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  wxGTK-devel, gtkspell-devel, db4-devel, zip, desktop-file-utils
Requires:       gettext
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils


%description
This program is GUI frontend to GNU Gettext utilities and catalogs 
editor/source code parser. It helps with translating application into 
another language.


%prep
%setup -q


%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# Remove a few unnecessary locations where the makefile may install
# copies of icons and .desktop files
rm -rf \
    $RPM_BUILD_ROOT%{_datadir}/applnk \
    $RPM_BUILD_ROOT%{_datadir}/mimelnk \
    $RPM_BUILD_ROOT%{_datadir}/gnome \
    $RPM_BUILD_ROOT%{_datadir}/mime-info
# Make sure docs are utf-8
for FILE in `find docs/en -name '*.hhp'`; do
    iconv -f iso-8859-15 -t utf-8 $FILE > $FILE.tmp
    mv -f $FILE.tmp $FILE
done
# Install the desktop file
desktop-file-install \
    --delete-original \
    --vendor fedora \
    --dir $RPM_BUILD_ROOT%{_datadir}/applications \
    --add-category X-Fedora \
    $RPM_BUILD_ROOT%{_datadir}/applications/poedit.desktop
%{find_lang} poedit


%clean
rm -rf $RPM_BUILD_ROOT


%post
update-desktop-database &> /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%postun
update-desktop-database &> /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%files -f poedit.lang
%defattr(-,root,root,-)
%doc NEWS TODO README COPYING AUTHORS docs/*.txt docs/en
%{_bindir}/*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/*
%{_datadir}/pixmaps/*
%{_mandir}/man?/*
%{_datadir}/poedit


%changelog
* Sun Dec 23 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.9-1
- Upstream 1.3.9
- Make sure all docs are utf-8

* Fri Aug 17 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.7-1
- Upstream 1.3.7
- Require gettext (#253228)

* Sun Dec 17 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.6-1.2
- Rebuild for new wx in devel

* Fri Nov 10 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.6-1.1
- Rebuild for newer db4 in devel

* Mon Oct 30 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.6-1
- Upstream 1.3.6

* Sun Oct 29 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.5-1
- Upstream 1.3.5

* Sun Sep 03 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.4-2.1
- FC6 rebuild

* Wed May 24 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.4-2
- Remove any potential places where makefile may create copies of 
  .desktop files and icons.

* Tue May 23 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.3.4-1
- Initial packaging