[svn] r5868 - in trunk/rpms: . html2ps

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Tue Sep 25 11:36:29 CEST 2007


Author: dag
Date: 2007-09-25 11:36:28 +0200 (Tue, 25 Sep 2007)
New Revision: 5868

Added:
   trunk/rpms/html2ps/
   trunk/rpms/html2ps/html2ps-1.0b5-conf.patch
   trunk/rpms/html2ps/html2ps-1.0b5-open.patch
   trunk/rpms/html2ps/html2ps-1.0b5-perl_path.patch
   trunk/rpms/html2ps/html2ps.spec
Log:
Updates

Added: trunk/rpms/html2ps/html2ps-1.0b5-conf.patch
===================================================================
--- trunk/rpms/html2ps/html2ps-1.0b5-conf.patch	                        (rev 0)
+++ trunk/rpms/html2ps/html2ps-1.0b5-conf.patch	2007-09-25 09:36:28 UTC (rev 5868)
@@ -0,0 +1,67 @@
+diff -Nur html2ps-1.0b3.orig/html2ps html2ps-1.0b3/html2ps
+--- html2ps-1.0b3.orig/html2ps	Wed Aug 16 23:42:03 2000
++++ html2ps-1.0b3/html2ps	Mon Mar 19 20:55:05 2001
+@@ -26,8 +26,8 @@
+ # Set the name of the global configuration file. See the installation notes
+ # and manual page for more details on configuration files.
+ 
+-$globrc='/opt/misc/lib/html2ps/html2psrc';
+-$ug='/opt/misc/lib/html2ps/html2ps.html';
++$globrc='@CONFDIR@/html2psrc';
++$ug='@DOCDIR@/html2ps.html';
+ 
+ $conf=<<'EOR';
+ @html2ps {
+@@ -478,6 +478,17 @@
+ print DBG "*****\n" if($opt_d);
+ &pagedef;
+ ($pagew,$pageh)=split /\s+/, $AT_page{'size'} if(defined $AT_page{'size'});
++
++# try autoconfiguration (basing on paths known from PLD packages)
++eval "require Image::Magick"; $package{'PerlMagick'}=!$@;
++$package{'ImageMagick'} = ( -x "/usr/X11R6/bin/mogrify" );
++$package{'pbmplus'} = ( -x "/usr/bin/giftoppm" );
++$package{'netpbm'} = ( -x "/usr/bin/giftopnm" );
++$package{'djpeg'} = ( -x "/usr/bin/djpeg" );
++$package{'Ghostscript'} = ( -x "/usr/bin/gs" );
++$package{'TeX'} = ( -x "/usr/bin/tex" );
++$package{'dvips'} = ( -x "/usr/bin/dvips" );
++eval "require LWP::UserAgent"; $package{'libwww-perl'}=!$@;
+ 
+ require Image::Magick if($package{'PerlMagick'});
+ $geturl=$package{'geturl'};
+diff -Nur html2ps-1.0b3.orig/html2ps.1 html2ps-1.0b3/html2ps.1
+--- html2ps-1.0b3.orig/html2ps.1	Wed Aug 16 23:42:03 2000
++++ html2ps-1.0b3/html2ps.1	Mon Mar 19 20:54:13 2001
+@@ -348,6 +348,9 @@
+ 
+ .SH FILES
+ .TP
++ at CONFDIR@/html2psrc
++Global configuration file, see html2psrc(5).
++.TP
+ $HOME/.html2psrc
+ User configuration file, see html2psrc(5).
+ .SH SEE ALSO
+diff -Nur html2ps-1.0b3.orig/html2psrc html2ps-1.0b3/html2psrc
+--- html2ps-1.0b3.orig/html2psrc	Thu Jan  1 01:00:00 1970
++++ html2ps-1.0b3/html2psrc	Mon Mar 19 20:52:21 2001
+@@ -0,0 +1,18 @@
++/* Global configuration file for html2ps */
++
++ at html2ps {
++  package {
++    path: "/usr/X11R6/bin:/usr/bin";
++  }
++  paper {
++    type: A4;
++  }
++  hyphenation {
++    en {
++      file: "/usr/share/texmf/tex/generic/hyphen/hyphen.tex";
++    }
++    pl {
++      file: "/usr/share/texmf/tex/generic/hyphen/plhyph.tex";
++    }
++  }
++}

Added: trunk/rpms/html2ps/html2ps-1.0b5-open.patch
===================================================================
--- trunk/rpms/html2ps/html2ps-1.0b5-open.patch	                        (rev 0)
+++ trunk/rpms/html2ps/html2ps-1.0b5-open.patch	2007-09-25 09:36:28 UTC (rev 5868)
@@ -0,0 +1,31 @@
+--- html2ps.orig	Wed Aug 16 23:42:03 2000
++++ html2ps	Wed Oct  9 18:41:24 2002
+@@ -354,8 +354,8 @@
+ 
+ EOR
+ 
+-eval "require POSIX";
+-$posix = !$@;
++use POSIX;
++$posix = 1;
+ 
+ %extend=('quote',1, 'font',1, 'colour',1, 'hyphenation',1);
+ %fal=("serif","times", "sans_serif","helvetica", "monospace","courier");
+@@ -495,6 +495,8 @@
+ die "Ghostscript is required to generate cross references\n"
+  if($opt_R && !$package{'Ghostscript'});
+ $tmpname=$posix?POSIX::tmpnam():"h2p_$$";
++sysopen TMP, $tmpname, O_RDWR|O_CREAT|O_EXCL, 0600 or die "$!";
++close TMP;
+ ($scr=$tmpname)=~/\w+$/;
+ $tempdir=$`;
+ 
+@@ -3179,7 +3181,7 @@
+       open(SCRATCH,">$scr.tex");
+       print SCRATCH $tex;
+       close SCRATCH;
+-      `tex $scr.tex`;
++      `tex $scr.tex`;# seems ok, $scr not user controlled
+       `dvips -E -o $scr.ps $scr.dvi`;
+       open(LOG,"$scr.log");
+       $log=<LOG>;

Added: trunk/rpms/html2ps/html2ps-1.0b5-perl_path.patch
===================================================================
--- trunk/rpms/html2ps/html2ps-1.0b5-perl_path.patch	                        (rev 0)
+++ trunk/rpms/html2ps/html2ps-1.0b5-perl_path.patch	2007-09-25 09:36:28 UTC (rev 5868)
@@ -0,0 +1,11 @@
+--- html2ps-1.0b3/html2ps~	Mon Feb 25 05:11:57 2002
++++ html2ps-1.0b3/html2ps	Mon Feb 25 05:11:57 2002
+@@ -1,7 +1,4 @@
+-: # Use perl
+-eval 'exec perl -S $0 "$@"'
+-  if $running_under_some_shell;
+-
++#!/usr/bin/perl
+ # This is html2ps version 1.0 beta5, an HTML-to-PostScript converter.
+ #   Copyright (C) 1995-2005 Jan Karrman.
+ #

Added: trunk/rpms/html2ps/html2ps.spec
===================================================================
--- trunk/rpms/html2ps/html2ps.spec	                        (rev 0)
+++ trunk/rpms/html2ps/html2ps.spec	2007-09-25 09:36:28 UTC (rev 5868)
@@ -0,0 +1,78 @@
+# $Id$
+# Authority: dag
+
+Summary: HTML to PostScript converter
+Name: html2ps
+%define real_version 1.0b5
+Version: 1.0
+Release: 0.b5
+License: GPL
+Group: Applications/Graphics
+URL: http://user.it.uu.se/~jan/html2ps.html
+
+Source: http://user.it.uu.se/~jan/html2ps-%{real_version}.tar.gz
+Patch0: html2ps-1.0b5-conf.patch
+Patch1: html2ps-1.0b5-perl_path.patch
+Patch2: html2ps-1.0b5-open.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+BuildArch: noarch
+
+%description
+The Perl script html2ps converts HTML to PostScript. It would have
+more capabilities if you have some of these packages installed:
+ImageMagick, netpbm-progs, libjpeg-progs, perl-libwww, ghostscript,
+tetex, tetex-dvips - see documentation for details.
+
+html2ps can be used as ImageMagick delegate to convert from HTML.
+
+%package -n xhtml2ps
+Summary: GUI frontend for html2ps, a HTML-to-PostScript converter
+Group: Applications/Graphics
+Requires: %{name} = %{version}-%{version}
+Requires: tk
+
+%description -n xhtml2ps
+xhtml2ps is freely-available GUI frontend for html2ps, a
+HTML-to-PostScript converter.
+
+
+%prep
+%setup -n %{name}-%{real_version}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p0
+
+%build
+%{__perl} -pi.orig -e '
+        s|\@CONFDIR\@|%{_sysconfdir}|;
+        s|\@DOCDIR\@|%{_docdir}/%{name}-%{version}|;
+    ' html2ps html2ps.1
+
+%install
+%{__rm} -rf %{buildroot}
+%{__install} -Dp -m0755 html2ps %{buildroot}%{_bindir}/html2ps
+%{__install} -Dp -m0755 contrib/xhtml2ps/xhtml2ps %{buildroot}%{_bindir}/xhtml2ps
+%{__install} -Dp -m0644 html2psrc %{buildroot}%{_sysconfdir}/html2psrc
+%{__install} -Dp -m0644 html2ps.1 %{buildroot}%{_mandir}/man1/html2ps.1
+%{__install} -Dp -m0644 html2psrc.5 %{buildroot}%{_mandir}/man5/html2psrc.5
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files
+%defattr(-, root, root, 0755)
+%doc COPYING html2ps.html README sample
+%doc %{_mandir}/man1/html2ps.1*
+%doc %{_mandir}/man5/html2psrc.5*
+%config(noreplace) %{_sysconfdir}/html2psrc
+%{_bindir}/html2ps
+
+%files -n xhtml2ps
+%defattr(-, root, root, 0755)
+%doc contrib/xhtml2ps/LICENSE contrib/xhtml2ps/README
+%{_bindir}/xhtml2ps
+
+%changelog
+* Tue Sep 25 2007 Dag Wieers <dag at wieers.com> - 1.0b5-0
+- Initial package. (using DAR)


Property changes on: trunk/rpms/html2ps/html2ps.spec
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native



More information about the svn-commits mailing list