pkgsrc/print/magicfilter/Makefile

48 lines
1.2 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.7 1998/11/08 22:03:57 tron Exp $
DISTNAME= magicfilter-1.2
PKGNAME= magicfilter-${PAPERSIZE}-1.2
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= system/printing
MAINTAINER= tron@netbsd.org
DEPENDS+= a2ps-${PAPERSIZE}-4.10.3:../../print/a2ps \
ghostscript-5.50:../../print/ghostscript5 \
1998-07-04 11:26:16 +02:00
netpbm-19940301:../../graphics/netpbm \
teTeX-0.4p8:../../print/teTeX
CONFLICTS= magicfilter-1.2
USE_GMAKE= yes
GNU_CONFIGURE= yes
PLIST_SRC= ${WRKDIR}/PLIST
PAPERSIZE?= A4
FILTER_DIR= libexec/magicfilter
post-install:
@${CP} ${PKGDIR}/PLIST ${PLIST_SRC}
@${MKDIR} ${PREFIX}/${FILTER_DIR}
@(cd ${WRKSRC}/filters; \
1998-07-05 14:27:14 +02:00
for FILTER in *-filter; do \
TARGET=${PREFIX}/${FILTER_DIR}/$$FILTER; \
${ECHO} "Installing $$FILTER as $$TARGET"; \
${SED} 's/-sOutputFile=-/-sOutputFile=- ${GS_OPTS}/' \
<$$FILTER >${PREFIX}/${FILTER_DIR}/$$FILTER; \
chown ${BINOWN}:${BINGRP} $$TARGET; \
chmod ${BINMODE} $$TARGET; \
${ECHO} ${FILTER_DIR}/$$FILTER >>${PLIST_SRC}; \
1998-07-05 14:27:14 +02:00
done)
@${ECHO} "@dirrm ${FILTER_DIR}" >>${PLIST_SRC}
.include "../../mk/bsd.pkg.mk"
.if ${PAPERSIZE} == A4
GS_OPTS= -sPAPERSIZE=a4
.else
GS_OPTS= -sPAPERSIZE=letter
.endif