rpms/gscan2pdf/devel gscan2pdf-load-save-fix.patch, NONE, 1.1 gscan2pdf.spec, 1.1, 1.2

Bernard Johnson (bjohnson) fedora-extras-commits at redhat.com
Wed Mar 21 19:36:41 UTC 2007


Author: bjohnson

Update of /cvs/extras/rpms/gscan2pdf/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6075/devel

Modified Files:
	gscan2pdf.spec 
Added Files:
	gscan2pdf-load-save-fix.patch 
Log Message:
auto-import gscan2pdf-0.9.5-5 on branch devel from gscan2pdf-0.9.5-5.src.rpm

gscan2pdf-load-save-fix.patch:

--- NEW FILE gscan2pdf-load-save-fix.patch ---
--- gscan2pdf-0.9.5/bin/gscan2pdf	2007-03-08 12:55:14.000000000 -0700
+++ /usr/bin/gscan2pdf	2007-03-20 11:34:01.000000000 -0600
@@ -938,12 +941,12 @@
 
 # Check that the file really is a tiff
    my $output = `tiffinfo \"$filename\" 2>&1 1>/dev/null`;
-   if ($output =~ /Not a TIFF file/) {
+   if ($output =~ /Not a TIFF file/ || $output =~ /Cannot open/) {
     my $dialog = Gtk2::MessageDialog -> new ($window,
                                             'destroy-with-parent',
                                             'error',
                                             'close',
-                                            $d->get('Not a TIFF file'));
+                                            $d->get('Not a TIFF file or file is inaccessable'));
     $dialog -> run;
     $dialog -> destroy;
    }
@@ -1378,6 +1380,19 @@
 # $SETTING{'Page range'} = 'selected' if $SETTING{'RMB'};
 #warn "rmb pdf $SETTING{'RMB'} $SETTING{'Page range'}\n";
 
+  # do not allow save if there are no pages
+  if ($#{$slist -> {data}} < 0) {
+    my $dialog = Gtk2::MessageDialog -> new ($window,
+                                            'destroy-with-parent',
+                                            'error',
+                                            'close',
+                                            $d->get('No pages to save'));
+    $dialog -> run;
+    $dialog -> destroy;
+    return;
+  }
+
+
  if ($uimanager->get_widget('/MenuBar/Edit/Options') -> get_active) {
 
   if (defined $windowp) {


Index: gscan2pdf.spec
===================================================================
RCS file: /cvs/extras/rpms/gscan2pdf/devel/gscan2pdf.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gscan2pdf.spec	21 Mar 2007 19:32:27 -0000	1.1
+++ gscan2pdf.spec	21 Mar 2007 19:36:08 -0000	1.2
@@ -1,61 +1,95 @@
-Name:      gscan2pdf
-Version: 0.9.5
-Release:   1%{?dist}
-Summary:   A GUI to ease the process of producing a multipage PDF from a scan
-Group:     Applications/Publishing
-License:   GPL
-URL:       http://%{name}.sourceforge.net/
-Source0:   %{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-BuildArch: noarch
-ExclusiveArch: noarch
-Packager:  Jeffrey Ratcliffe <ra28145 at users.sourceforge.net>
-Requires:  perl(Gtk2) >= 1:1.043-1, perl(Glib) >= 1.100-1, perl(Locale::gettext) >= 1.05, sane, libtiff
+Name:           gscan2pdf
+Version:        0.9.5
+Release:        5%{?dist}
+Summary:        A GUI for producing a multipage PDF from a scan
+
+Group:          Applications/Publishing
+License:        GPL
+URL:            http://gscan2pdf.sourceforge.net
+Source0:        http://downloads.sourceforge.net/gscan2pdf/gscan2pdf-0.9.5.tar.gz
+Patch0:         gscan2pdf-load-save-fix.patch 
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
+
+BuildRequires:  gettext, desktop-file-utils
+Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires:       ImageMagick, djvulibre, sane-backends, sane-frontends, xdg-utils
+# Required for help system to be functional
+Requires:       perl-Gtk2-Ex-PodViewer
+# These package can be added for additional functionality
+#Requires:       unpaper
+#Requires:       gocr
 
 %description
-At maturity, the GUI will have similar features to that of the Windows Imaging
-program, but with the express objective of writing a PDF, including metadata.
+A GUI to ease the process of producing a multipage PDF from a scan.
 
-Scanning is handled with SANE via scanimage. PDF conversion is done by libtiff.
 
 %prep
 %setup -q
 
+%patch -p1 -b .load-save-fix
+
 %build
-rm -rf $RPM_BUILD_ROOT
-perl Makefile.PL
-make
-make test
+%{__perl} Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
+
 
 %install
-make DESTDIR=$RPM_BUILD_ROOT INSTALLMAN1DIR=/usr/share/man/man1 \
-     INSTALLSITEMAN1DIR=/usr/share/man/man1 INSTALLMAN3DIR=/usr/share/man/man3 \
-     INSTALLSITEMAN3DIR=/usr/share/man/man3 SHAREINSTDIR=/usr/share/%{name} \
-     install
-find $RPM_BUILD_ROOT -name perllocal.pod | xargs rm -f
-find $RPM_BUILD_ROOT -name .packlist | xargs rm -f
+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 --vendor=""                 \
+  --dir=$RPM_BUILD_ROOT/%{_datadir}/applications \
+  $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop
+
+%find_lang %{name}
+
+%check
+make test
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files
-%defattr(0644,root,root,0755)
-%doc COPYING INSTALL LICENCE History
-%attr(0755,root,root) %{_bindir}/gscan2pdf
+%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
+%{_bindir}/*
+%{_datadir}/%{name}/*
 %{_datadir}/applications/%{name}.desktop
-%{_datadir}/locale/*/LC_MESSAGES/%{name}.mo
-%{_datadir}/%{name}/%{name}.png
-%{_datadir}/%{name}/rotate90.png
-%{_datadir}/%{name}/rotate180.png
-%{_datadir}/%{name}/rotate270.png
-%{_datadir}/%{name}/scanner.png
-%{_datadir}/%{name}/pdf.png
-%{_mandir}/man1/%{name}.1p.gz
+%{_mandir}/man1/*.1*
 
 %changelog
-* Thu Mar 08 2007 Jeffrey Ratcliffe <ra28145 at users.sourceforge.net>
-  - Fixed bug where nothing saved if no default for page rage
-  - Seperated pdf, tiff and scan compression defaults
-  - Save TIFF and DjVu now respects enable options toggle
-  - cancel on scan dialog now sends ctrl-c to scanimage
-  - update to Czech translation (thanks to Petr Jelínek)
+* Tue Mar 20 2007 Bernard Johnson <bjohnson at 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 at symetrix.com> - 0.9.5-4
+- add Requires: for perl-Gtk2-Ex-PodViewer
+
+* Sat Mar 17 2007 Bernard Johnson <bjohnson at symetrix.com> - 0.9.5-3
+- add desktop file the fedora way
+
+* Thu Mar 15 2007 Bernard Johnson <bjohnson at symetrix.com> - 0.9.5-2
+- add scriptlets to update icon cache
+
+* Wed Mar 14 2007 Bernard Johnson <bjohnson at symetrix.com> - 0.9.5-1
+- initial release




More information about the fedora-extras-commits mailing list