#! /bin/sh -e
## 
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description. 

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi  
case "$1" in
       -patch) patch $patch_opts -p1 < $0;;
       -unpatch) patch $patch_opts -p1 -R < $0;;
        *)
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
		exit 1;;
esac            

exit 0
@DPATCH@
--- a/doc/faxspool.1in
+++ b/doc/faxspool.1in
@@ -65,7 +65,7 @@ additional information about the user se
 Optionally,
 .I faxspool
 can generate user-customizable fax cover pages. It is quite easy to set
-up: if a file @LIBDIR@/make.coverpg exists and is executable, it is run
+up: if a file @CONFDIR@/make.coverpg exists and is executable, it is run
 with all relevant source/destination data on the command line, and its
 output is sent as the first page of the resulting fax. If $HOME/.make.coverpg
 exists, this file is used instead. See coverpg(1) for
@@ -138,7 +138,7 @@ No message is issued if the program isn'
 faxspool will simply queue the fax without cover page.
 
 The default cover page program used is $HOME/.make.coverpg; if this file
-doesn't exist @LIBDIR@/make.coverpg is used. (However, if $HOME/.make.coverpg
+doesn't exist @CONFDIR@/make.coverpg is used. (However, if $HOME/.make.coverpg
 exists, but is not executable, no coverpage is used at all.)
 .TP
 .B -p
@@ -200,7 +200,7 @@ list of denied users
 .B @CONFDIR@/faxheader
 default fax page header
 .TP
-.B @LIBDIR@/make.coverpg
+.B @CONFDIR@/make.coverpg
 program to create fax cover page (see coverpg(1)).
 .TP
 .B @CONFDIR@/faxspool.rules
--- a/fax/faxspool.in
+++ b/fax/faxspool.in
@@ -165,7 +165,7 @@ GS_DRIVER_LO="-sDEVICE=faxg3 -r204x98"
 #
 # program that will generate fax coverpage (see "man coverpg")
 #
-MAKE_COVER_PG=@LIBDIR@/make.coverpg
+MAKE_COVER_PG=@CONFDIR@/make.coverpg
 
 #
 # local fax number (will be overriden by "sendfax.config" if set there!)
