2001-02-17 18:42:09 +01:00
|
|
|
# $NetBSD: Makefile,v 1.28 2001/02/17 17:51:48 wiz Exp $
|
1998-06-23 23:35:55 +02:00
|
|
|
|
|
|
|
DISTNAME= magicfilter-1.2
|
|
|
|
CATEGORIES= print
|
1999-04-15 22:39:38 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SUNSITE:=system/printing/}
|
1998-06-23 23:35:55 +02:00
|
|
|
|
1999-10-07 19:41:46 +02:00
|
|
|
MAINTAINER= packages@netbsd.org
|
2001-02-17 18:42:09 +01:00
|
|
|
COMMENT= customizable, extensible automatic printer filter
|
1998-06-23 23:35:55 +02:00
|
|
|
|
2000-02-15 10:26:12 +01:00
|
|
|
DEPENDS+= a2ps-*:../../print/a2ps
|
2000-05-10 17:39:06 +02:00
|
|
|
DEPENDS+= ghostscript{,-nox11}-[6-9]*:../../print/ghostscript
|
2000-02-15 10:26:12 +01:00
|
|
|
DEPENDS+= netpbm-*:../../graphics/netpbm
|
|
|
|
DEPENDS+= teTeX-bin-*:../../print/teTeX-bin
|
|
|
|
DEPENDS+= papersize-*:../../print/papersize
|
1998-06-23 23:35:55 +02:00
|
|
|
|
|
|
|
USE_GMAKE= yes
|
|
|
|
GNU_CONFIGURE= yes
|
2000-04-20 18:32:47 +02:00
|
|
|
CONFIGURE_ENV+= GHOSTSCRIPT=${LOCALBASE}/bin/gs
|
1998-06-23 23:35:55 +02:00
|
|
|
|
|
|
|
PLIST_SRC= ${WRKDIR}/PLIST
|
|
|
|
|
1998-07-05 12:09:58 +02:00
|
|
|
FILTER_DIR= libexec/magicfilter
|
|
|
|
|
1998-11-11 12:28:02 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
PAPERSIZE?= A4
|
|
|
|
|
1998-06-23 23:35:55 +02:00
|
|
|
post-install:
|
|
|
|
@${CP} ${PKGDIR}/PLIST ${PLIST_SRC}
|
1998-07-05 12:09:58 +02:00
|
|
|
@${MKDIR} ${PREFIX}/${FILTER_DIR}
|
1998-11-11 01:28:45 +01:00
|
|
|
@(cd ${WRKSRC}/filters; \
|
1998-11-11 12:28:02 +01:00
|
|
|
paper=`${ECHO} ${PAPERSIZE} | ${TR} '[A-Z]' '[a-z]'`; \
|
1998-11-11 01:28:45 +01:00
|
|
|
for FILTER in *-filter; do \
|
|
|
|
TARGET=${PREFIX}/${FILTER_DIR}/$$FILTER; \
|
|
|
|
${ECHO} "Installing $$FILTER as $$TARGET"; \
|
1998-11-11 12:28:02 +01:00
|
|
|
${SED} 's/-sOutputFile=-/-sOutputFile=- -sPAPERSIZE='$$paper'/' \
|
1998-11-11 01:28:45 +01:00
|
|
|
<$$FILTER >${PREFIX}/${FILTER_DIR}/$$FILTER; \
|
2000-01-10 01:57:13 +01:00
|
|
|
${CHOWN} ${BINOWN}:${BINGRP} $$TARGET; \
|
|
|
|
${CHMOD} ${BINMODE} $$TARGET; \
|
1998-11-11 01:28:45 +01:00
|
|
|
${ECHO} ${FILTER_DIR}/$$FILTER >>${PLIST_SRC}; \
|
1998-07-05 14:27:14 +02:00
|
|
|
done)
|
|
|
|
@${ECHO} "@dirrm ${FILTER_DIR}" >>${PLIST_SRC}
|
1998-06-23 23:35:55 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|