Blob Blame Raw
Name:           gscan2pdf
Version:        1.0.0
Release:        1%{?dist}
Summary:        GUI for producing a multipage PDF from a scan

Group:          Applications/Publishing
License:        GPLv3
URL:            http://gscan2pdf.sourceforge.net
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0:         gscan2pdf-gconftool-2.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

BuildRequires:  perl(ExtUtils::MakeMaker), perl(Test::More)
BuildRequires:  gettext, desktop-file-utils

Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires:       djvulibre, sane-backends >= 1.0.17, sane-frontends
Requires:       xdg-utils, unpaper, gocr, GConf2, libtiff-tools
Requires:       perl(Gtk2::Ex::PodViewer), perl(PDF::API2), perl(forks)
Requires:       perl(Set::IntSpan)

%description
A GUI to ease the process of producing a multipage PDF from a scan.


%prep
%setup -q

%patch0 -p1 -b .gconftool-2

# fix file that is not UTF-8
iconv --from=ISO-8859-1 --to=UTF-8 History > History.new
mv History.new History

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
rm -f $RPM_BUILD_ROOT/%{perl_archlib}/perllocal.pod
chmod -R u+w $RPM_BUILD_ROOT/*

desktop-file-install --delete-original --vendor="fedora" \
  --dir=$RPM_BUILD_ROOT/%{_datadir}/applications         \
  $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop

%find_lang %{name}

%check
# disable test for now - there are a lot of dependencies that were not in
# versions prior to 1.0.0
#make test

%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 %{name}.lang
%defattr(-,root,root,-)
%doc LICENCE History
%{_bindir}/*
%{perl_vendorlib}/*
%{_datadir}/%{name}
%{_datadir}/applications/*-%{name}.desktop
%{_datadir}/pixmaps/%{name}.svg
%{_mandir}/man1/*.1*

%changelog
* Tue Sep 27 2011 Bernard Johnson <bjohnson@symetrix.com> - 1.0.0-1
- v 1.0.0 (bz #740997)
- disable tests for now due to dependencies

* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.9.32-2
- Perl mass rebuild

* Wed Feb 16 2011 Bernard Johnson <bjohnson@symetrix.com> - 0.9.32-1
- v 0.9.32

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

* Sun Aug 08 2010 Bernard Johnson <bjohnson@symetrix.com> - 0.9.31-1
- v 0.9.31-1 (bz #616378)
- dependency should be for libtiff-tools, not libtiff

* Tue Jun 01 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.9.30-7
- Mass rebuild with perl-5.12.0

* Sun May 09 2010 Bernard Johnson <bjohnson@symetrix.com> - 0.9.30-6
- add dependency for GConf2, libtiff (bz #586350)
- add patch to find gconftool-2

* Sun May 09 2010 Bernard Johnson <bjohnson@symetrix.com> - 0.9.30-5
- fix copy/paste error in spec

* Sun May 09 2010 Bernard Johnson <bjohnson@symetrix.com> - 0.9.30-4
- patch to wait for output images when batch scanning (bz #581136)

* Wed Apr 07 2010 Bernard Johnson <bjohnson@symetrix.com> - 0.9.30-3
- patch for "Unknown message" window alerts while scanning (bz #571761)

* Fri Feb 12 2010 Bernard Johnson <bjohnson@symetrix.com> - 0.9.30-2
- missed dependency: perl(Set::IntSpan) (bz #563339)
- convert History to UTF-8

* Tue Feb 02 2010 Bernard Johnson <bjohnson@symetrix.com> - 0.9.30-1
- v 0.9.30
- tesseract patch removed (upstream fix)

* Tue Jan 19 2010 Bernard Johnson <bjohnson@symetrix.com - 0.9.29-1
- v 0.9.29 (bz #507493)
- patch to locate tesseract language data files (bz #554481)

* Fri Dec  4 2009 Stepan Kasal <skasal@redhat.com> - 0.9.27-6
- rebuild against perl 5.10.1

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.27-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.27-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Feb 05 2009 Bernard Johnson <bjohnson@symetrix.com> - 0.9.27-3
- bump release

* Thu Feb 05 2009 Bernard Johnson <bjohnson@symetrix.com> - 0.9.27-2
- fix gscan2pdf script to look for scanadf-perl and scanimage-perl

* Tue Jan 27 2009 Bernard Johnson <bjohnson@symetrix.com> - 0.9.27-1
- v 0.9.27
- gscan2pdf: update to 0.9.27 (bz #482882)
- gscan2pdf crashes with segmentation fault. (bz #474894)

* Tue Sep 30 2008 Bernard Johnson <bjohnson@symetrix.com> - 0.9.26-1
- v 0.9.26

* Sun Jun 29 2008 Bernard Johnson <bjohnson@symetrix.com> - 0.9.24-1
- v 0.9.24

* Mon Apr 14 2008 Bernard Johnson <bjohnson@symetrix.com> - 0.9.23-1
- v 0.9.23

* Thu Mar 06 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.9.21-2
Rebuild for new perl

* Sat Feb 02 2008 Bernard Johnson <bjohnson@symetrix.com> - 0.9.21-1
- v 0.9.21

* Mon Nov 19 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.19-1
- v 0.9.19

* Fri Nov 16 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.18-1
- v 0.9.18

* Sun Oct 28 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.17-2
- license clarification

* Sun Oct 28 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.17-1
- v 0.9.17

* Sat Aug 25 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.16-1
- v 0.9.16

* Sun Jul 22 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.15-1
- v 0.9.15

* Wed Jul 11 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.14-1
- v 0.9.14

* Mon Jul 09 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.13-1
- v 0.9.13

* Thu Jun 21 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.12-2
- fix requires from ImageMagick to ImageMagick-perl
- add History to %%doc list

* Tue Jun 19 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.12-1
- v 0.9.12

* Thu Jun 14 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.10-2
- patch to fix paper size of output pdf file

* Tue Jun 05 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.10-1
- v 0.9.10

* Thu May 03 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.9-3
- will someone fix the "you didn't commit so I said I aborted the tag, but
  suprise, I lied and tagged it anyway" bug in the build system?  please?

* Thu May 03 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.9-2
- add missing BR on perl(ExtUtil::MakeMaker)
- fix vendor tag in desktop file

* Sat Apr 28 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.9-1
- 0.9.9
- remove load/save fix patch, fixed upstream

* Sun Mar 25 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.5-7
- use perl(...) style requires (bz #233768)
- make %%{_datadir}/%%{name} and owned directory (bz #233839)

* Wed Mar 21 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.5-6
- now require unpaper and gocr since they are in the extras repo

* Tue Mar 20 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.5-5
- patch to fix:
  a) tiff files that can not be opened
  b) restrict saving a pdf with no pages

* Mon Mar 19 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.5-4
- add Requires: for perl-Gtk2-Ex-PodViewer

* Sat Mar 17 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.5-3
- add desktop file the fedora way

* Thu Mar 15 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.5-2
- add scriptlets to update icon cache

* Wed Mar 14 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.9.5-1
- initial release