Blob Blame History Raw
Name:           krename
Version:        3.0.14
Release:        2%{?dist}
Summary:        Powerful batch file renamer
Group:          Applications/File
License:        GPLv2
URL:            http://www.krename.net/
Source0:        http://kent.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
Source3:        krename.desktop
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:       hicolor-icon-theme
BuildRequires:  kdelibs-devel desktop-file-utils
%description
KRename is a powerful batch renamer for KDE. It allows you to easily rename
hundreds or even more files in one go. The filenames can be created by parts
of the original filename, numbering the files or accessing hundreds of
informations about the file, like creation date or Exif informations of an
image.

%prep
%setup -q
for file in ChangeLog TODO; do
    iconv -f iso8859-1 -t utf8 $file > $file.utf8
    rm -rf $file
    mv $file.utf8 $file
done

%build
%configure --disable-rpath
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/applications #deleting unwanted default desktop file
desktop-file-install --vendor="fedora" \
                     --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
                     %{SOURCE3}
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

%postun
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README TODO
%{_bindir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/apps/konqueror
%{_datadir}/apps/krename
%{_datadir}/doc/HTML/en/krename
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/icons/locolor


%changelog
* Fri Aug 24 2007 Michał Bentkowski <mr.ecik at gmail.com> - 3.0.14-2
- BuildID rebuild
- License tag fix

* Sat Apr 28 2007 Michał Bentkowski <mr.ecik at gmail.com> - 3.0.14-1
- Update to 3.0.14

* Thu Dec 21 2006 Michał Bentkowski <mr.ecik at gmail.com> - 3.0.13-2
- Fix encoding of ChangeLog and TODO files
- Fix desktop file issue
- Add %%post and %%postun sections
- Make %%{_datadir}/apps/konqueror owned by this package

* Tue Dec 19 2006 Michał Bentkowski <mr.ecik at gmail.com> - 3.0.13-1
- Initial package