Attached is a suggested patch for the generic-builf-script.  I'm
not as familiar with xargs as I should be, so there may be better
ways of implementing some of these changes...

Areas it affects:

- Adds a couple of names to the list of files to be considered
  documentation (COPYRIGHT, CHANGELOG, RELEASE_NOTES)

- When compressing info files as part of an install, uses the
  -exec option of find rather than xargs.

  Packages that already compress info files on install will create
  an info dir, but there will not be any *.info files under that
  directory.  Find fails, and xargs attempts to call gzip without
  any input.  As a result, you get the error:

    gzip: compressed data not written to a terminal. Use -f to force compression.
    For help, type: gzip -h

  ... and the install fails.  Using the -exec option of find ensures
  that gzip is only executed when an info file is found.

- When compressing files using gzip as part of an install, adds
  the -f flag to the gzip arguments to force compression.

-Samrobb


--- generic-build-script.orig   2004-08-12 12:46:42.923790400 -0400
+++ generic-build-script        2004-08-12 12:46:42.733516800 -0400
@@ -1,4 +1,4 @@
-#!/bin/sh
+b#!/in/sh
 #
 # Generic package build script
 #
@@ -92,7 +92,9 @@
        CHANGES \
        CONTRIBUTORS \
        COPYING \
+       COPYRIGHT \
        CREDITS \
+       CHANGELOG \
        ChangeLog* \
        FAQ \
        HOW-TO-CONTRIBUTE \
@@ -104,6 +106,7 @@
        NOTES \
        PROGLIST \
        README \
+       RELEASE_NOTES \
        THANKS \
        TODO \
 "
@@ -181,12 +184,12 @@
     fi ;\
   done &&\
   if [ -d ${instdir}${prefix}/share/info ] ; then \
-    find ${instdir}${prefix}/share/info -name "*.info" | xargs gzip -q ; \
+    find ${instdir}${prefix}/share/info -name "*.info" -exec gzip -f -q '{}' \; ; \
   fi && \
   if [ -d ${instdir}${prefix}/share/man ] ; then \
     find ${instdir}${prefix}/share/man -name "*.1" -o -name "*.3" -o \
       -name "*.3x" -o -name "*.3pm" -o -name "*.5" -o -name "*.6" -o \
-      -name "*.7" -o -name "*.8" | xargs gzip -q ; \
+      -name "*.7" -o -name "*.8" | xargs gzip -f -q ; \
   fi && \
   templist="" && \
   for f in ${install_docs} ; do \

Reply via email to