43 lines
1.2 KiB
Makefile
43 lines
1.2 KiB
Makefile
# $NetBSD: Makefile,v 1.24 2000/04/16 17:36:46 jlam Exp $
|
|
|
|
DISTNAME= magicfilter-1.2
|
|
CATEGORIES= print
|
|
MASTER_SITES= ${MASTER_SITE_SUNSITE:=system/printing/}
|
|
|
|
MAINTAINER= packages@netbsd.org
|
|
|
|
DEPENDS+= a2ps-*:../../print/a2ps
|
|
DEPENDS+= ghostscript-5.50nb1:../../print/ghostscript5
|
|
DEPENDS+= netpbm-*:../../graphics/netpbm
|
|
DEPENDS+= teTeX-bin-*:../../print/teTeX-bin
|
|
DEPENDS+= papersize-*:../../print/papersize
|
|
|
|
USE_GMAKE= yes
|
|
GNU_CONFIGURE= yes
|
|
CONFIGURE_ENV+= GHOSTSCRIPT=${LOCALBASE}/bin/gstty
|
|
|
|
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='$$paper'/' \
|
|
<$$FILTER >${PREFIX}/${FILTER_DIR}/$$FILTER; \
|
|
${CHOWN} ${BINOWN}:${BINGRP} $$TARGET; \
|
|
${CHMOD} ${BINMODE} $$TARGET; \
|
|
${ECHO} ${FILTER_DIR}/$$FILTER >>${PLIST_SRC}; \
|
|
done)
|
|
@${ECHO} "@dirrm ${FILTER_DIR}" >>${PLIST_SRC}
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|