diff options
author | agc <agc@pkgsrc.org> | 1998-11-11 11:28:02 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 1998-11-11 11:28:02 +0000 |
commit | ae0a7520f1ee054234a6f8e437d1f9e75336b938 (patch) | |
tree | dad03537f5e83fe0c862a6772e248a7598d48de5 /print | |
parent | 295d56b8b5b6282111539bde421065df8b384f58 (diff) | |
download | pkgsrc-ae0a7520f1ee054234a6f8e437d1f9e75336b938.tar.gz |
Include bsd.prefs.mk, and set PAPERSIZE if it's not been set already.
Only calculate the lower-case papersize variable when it's needed.
Diffstat (limited to 'print')
-rw-r--r-- | print/magicfilter/Makefile | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/print/magicfilter/Makefile b/print/magicfilter/Makefile index d6e297cb4c5..18c124f66f6 100644 --- a/print/magicfilter/Makefile +++ b/print/magicfilter/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 1998/11/11 00:28:45 tron Exp $ +# $NetBSD: Makefile,v 1.11 1998/11/11 11:28:02 agc Exp $ DISTNAME= magicfilter-1.2 CATEGORIES= print @@ -22,14 +22,19 @@ PLIST_SRC= ${WRKDIR}/PLIST FILTER_DIR= libexec/magicfilter +.include "../../mk/bsd.prefs.mk" + +PAPERSIZE?= A4 + post-install: @${CP} ${PKGDIR}/PLIST ${PLIST_SRC} @${MKDIR} ${PREFIX}/${FILTER_DIR} @(cd ${WRKSRC}/filters; \ + paper=`${ECHO} ${PAPERSIZE} | ${TR} '[A-Z]' '[a-z]'`; \ for FILTER in *-filter; do \ TARGET=${PREFIX}/${FILTER_DIR}/$$FILTER; \ ${ECHO} "Installing $$FILTER as $$TARGET"; \ - ${SED} 's/-sOutputFile=-/-sOutputFile=- -sPAPERSIZE=${PSIZE}/' \ + ${SED} 's/-sOutputFile=-/-sOutputFile=- -sPAPERSIZE='$$paper'/' \ <$$FILTER >${PREFIX}/${FILTER_DIR}/$$FILTER; \ chown ${BINOWN}:${BINGRP} $$TARGET; \ chmod ${BINMODE} $$TARGET; \ @@ -38,5 +43,3 @@ post-install: @${ECHO} "@dirrm ${FILTER_DIR}" >>${PLIST_SRC} .include "../../mk/bsd.pkg.mk" - -PSIZE!= echo ${PAPERSIZE} | tr '[A-Z]' '[a-z]' |