Summary:        Simple scanning utility
Summary(ja):    シンプルなスキャナユーティリティ

Name:           simple-scan
Version:        2.32.0.1
Release:        1%{?_dist_release}

Group:          Applications/Multimedia
License:        GPLv3+
URL:            https://launchpad.net/simple-scan
Source0:        http://launchpad.net/simple-scan/trunk/%{version}/+download/simple-scan-%{version}.tar.gz

BuildRequires: intltool GConf2-devel gtk2-devel autoconf automake
BuildRequires: libgudev-devel sane-devel gnome-doc-utils
BuildRequires: dbus-glib-devel

Requires: gnome-icon-theme xdg-utils yelp
Requires(pre): GConf2
Requires(post): GConf2
Requires(preun): GConf2

%description
Simple Scan is an easy-to-use application, designed to let users connect their
scanner and quickly have the image/document in an appropriate format.

%description -l ja
Simple Scan は、手持ちのスキャナを接続して、すぐに画像や文書をスキャンできるように
するためのとても簡単なアプリケーションです。

%prep
%setup -q

%build

%configure --disable-schemas-install
make %{?_smp_mflags}

%install
make install DESTDIR=$RPM_BUILD_ROOT
%find_lang %{name} --with-man --with-gnome

%pre
if [ "$1" -gt 1 ]; then
  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  if [ -f "%{_sysconfdir}/gconf/schemas/%{name}.schemas" ]; then
    gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null
  fi
fi

%post
if [ "$1" -eq 0 ]; then
  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  if [ -f "%{_sysconfdir}/gconf/schemas/%{name}.schemas" ]; then
    gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null
  fi
fi

%preun
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
if [ -f "%{_sysconfdir}/gconf/schemas/%{name}.schemas" ]; then
  gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null
fi

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS README COPYING ChangeLog
%{_mandir}/man1/simple-scan.1.gz
%{_sysconfdir}/gconf/schemas/simple-scan.schemas
%{_bindir}/simple-scan
%{_datadir}/applications/simple-scan.desktop
%{_datadir}/simple-scan/

%changelog
* Fri Apr 08 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.32.0.1-1
- initial build for Vine Linux

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.32.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Nov 11 2010 Matthias Clasen <mclasen@redhat.com> - 2.32.0.1-1
- Update to 2.32.0.1

* Tue Aug 31 2010 Matthias Clasen <mclasen@redhat.com> - 2.31.91-1
- Update to 2.31.91

* Tue Aug 17 2010 Matthias Clasen <mclasen@redhat.com> - 2.31.90.2-1
- Update to 2.31.90.2

* Mon Aug 16 2010 Matthias Clasen <mclasen@redhat.com> - 2.31.90.1-1
- Update to 2.31.90.1
- Use GConf macros

* Tue Jul 13 2010 Matthias Clasen <mclasen@redhat.com> - 2.31.5-1
- Update to 2.31.5

* Wed Jun 30 2010 Matthias Clasen <mclasen@redhat.com> - 2.31.4-1
- Update to 2.31.4

* Mon Jun  7 2010 Matthias Clasen <mclasen@redhat.com> - 2.31.3-1
- Update to 2.31.3

* Thu May 27 2010 Matthias Clasen <mclasen@redhat.com> - 2.31.1-1
- Update to 2.31.1

* Mon Mar 17 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 0.9.9-1
- https://launchpad.net/simple-scan/trunk/0.9.9

* Mon Mar 08 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 0.9.5-2
- Organize and comment patch dependencies and link to upstream bug report 
- add requires on yelp and add gconf schema scriptlets 

* Fri Mar 05 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 0.9.5-1
- initial build