3643b4b
# Review at https://bugzilla.redhat.com/show_bug.cgi?id=540328
3643b4b
#
f52e008
# by default build nautilus extension
f52e008
# use with to change the default
f52e008
%bcond_without nautilus
f52e008
f52e008
Name:           gtkhash
f52e008
Version:        0.3.0
10ed589
Release:        3%{?dist}
f52e008
Summary:        GTK+ utility for computing message digests or checksums
f52e008
f52e008
Group:          Applications/File
f52e008
License:        GPLv2+
f52e008
URL:            http://gtkhash.sourceforge.net/
f52e008
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
f52e008
Source1:        %{name}.desktop
f52e008
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
f52e008
f52e008
BuildRequires:  gtk2-devel mhash-devel
f52e008
BuildRequires:  desktop-file-utils gettext intltool
3643b4b
%if %{with nautilus}
f52e008
BuildRequires:  GConf2-devel nautilus-devel
3643b4b
%endif
f52e008
f52e008
%description
f52e008
GtkHash is a GTK+ utility for computing message digests or checksums using the
f52e008
mhash library. Currently supported hash functions include MD5, SHA1, SHA256, 
f52e008
SHA512, RIPEMD, HAVAL, TIGER and WHIRLPOOL.
f52e008
f52e008
f52e008
%if %{with nautilus}
f52e008
%package        nautilus
f52e008
Summary:        GtkHash extension for nautilus
f52e008
Group:          User Interface/Desktops
f52e008
Requires:       %{name} = %{version}
f52e008
Requires:       nautilus
f52e008
Requires(pre):  GConf2
f52e008
Requires(post): GConf2
f52e008
Requires(preun): GConf2
f52e008
f52e008
%description    nautilus
f52e008
GtkHash extension for the nautilus file manger. It adds adds an additional tab
f52e008
called "Digests" to the file properties dialog.
f52e008
%endif
f52e008
f52e008
f52e008
%prep
f52e008
%setup -q
f52e008
f52e008
f52e008
%build
f52e008
%configure \
f52e008
%if %{with nautilus}
f52e008
  --enable-nautilus --disable-schemas-install
f52e008
%else
f52e008
  --disable-nautilus
f52e008
%endif
f52e008
make %{?_smp_mflags}
f52e008
f52e008
f52e008
%install
f52e008
rm -rf %{buildroot}
f52e008
make install DESTDIR=%{buildroot} INSTALL='install -p'
f52e008
%find_lang %{name}
caab38e
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
f52e008
desktop-file-install                               \
f52e008
  --dir=%{buildroot}%{_datadir}/applications       \
f52e008
  %{SOURCE1}
f52e008
f52e008
f52e008
%clean
f52e008
rm -rf %{buildroot}
f52e008
f52e008
f52e008
%if %{with nautilus}
f52e008
%pre nautilus
3643b4b
%gconf_schema_prepare %{name}
f52e008
f52e008
f52e008
%post nautilus
3643b4b
%gconf_schema_upgrade %{name}
f52e008
f52e008
f52e008
%preun nautilus
3643b4b
%gconf_schema_remove %{name}
f52e008
%endif
f52e008
f52e008
f52e008
%files -f %{name}.lang
f52e008
%defattr(-,root,root,-)
f52e008
%doc AUTHORS COPYING NEWS README TODO
f52e008
%{_bindir}/%{name}
f52e008
%{_datadir}/%{name}/
f52e008
%{_datadir}/applications/%{name}.desktop
f52e008
f52e008
f52e008
%if %{with nautilus}
f52e008
%files nautilus
f52e008
%defattr(-,root,root,-)
f52e008
%{_sysconfdir}/gconf/schemas/gtkhash.schemas
caab38e
%{_libdir}/nautilus/extensions-*/libgtkhash-properties.so
f52e008
%endif
f52e008
f52e008
f52e008
%changelog
caab38e
* Wed Feb 09 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.0-3
caab38e
- Fix for nautilus 3.0.
10ed589
f52e008
* Mon Nov 23 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.0-2
f52e008
- Rework conditionals
f52e008
f52e008
* Sun Nov 22 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.0-1
f52e008
- Update to 0.3.0
f52e008
- Build nautilus extension as additional package
f52e008
f52e008
* Wed Dec 31 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.2.1-1
f52e008
- Initial package